Posts by Eduardo Dornel • 370 points
20 posts
-
0
votes2
answers73
viewsA: Line limit in Recycleview
in his getItemCount try to use return Math.min(items.size(), 4);
-
0
votes2
answers43
viewsA: How to check if there is an update in google play for my application
If you use Firebase you can put the version variable in it through the Functions, then in your app you can use the BuildConfig.VERSION_NAME to make the comparison! If you don’t use Firebase,…
-
0
votes2
answers149
viewsA: How to send an Arraylist<Object> to Webservice SOAP
change public class Pedido { for public class Pedido implements Serializable { and public class Item { for public class Item implements Serializable { If your classes are not serialized they cannot…
-
4
votes2
answers782
viewsA: How to delete git branches that don’t exist on the remote
The command below deletes all deleted branches that never existed on the remote: git fetch -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch;…
-
0
votes1
answer54
viewsA: Thread Android error that is crashing the app at the time of opening
Heavy operations cannot be done on MainThread, try opening another thread and putting your SpeechRecognizer in it. ExecutorService pool = Executors.newSingleThreadExecutor(); Runnable task = new…
-
1
votes2
answers40
viewsA: How to avoid layout destroyer in Tabbed Layout when changed tab?
You have to extend FragmentStatePagerAdapter and not FragmentPagerAdapter. to tell how many screens you want to keep open, use the method: seuViewPager.setOffscreenPageLimit(2)…
-
0
votes1
answer24
viewsA: Display of the Textview
You are viewing the preview in a Nexus 5X, try switching to another model with the larger screen, probably this is your problem!
-
6
votes1
answer740
viewsQ: Add sequence of numbers in Javascript
Let’s assume that the user type the value 40391, so I need to add incrementally all values from 1 up to 40390, which results in the value 815696245. Today I do it with a simple for but I realized…
-
0
votes1
answer26
viewsA: how to set the position of the item in the horizontal recycleview list?
You’ll have to add one Header for your Adapter, this Header will be the first item that will make your list start more to the right just as you want it. This tutorial teaches you how to add a Header…
-
0
votes1
answer77
viewsA: How to Hide My Recyclerview
You will have to pass the click event by the Activity to the Adapter. in your Adapter add this interface: public interface OnItemClickLister { void onItemClick(String nome); } In your Activity call…
-
1
votes1
answer31
viewsA: Error while displaying message
Try to use: runOnUiThread(new Runnable() { @Override public void run() { if (valorLido.equals("0")){ Toast.makeText(MainActivity.this, "Ambiente escuro! Lâmpada deve ser acesa!",…
androidanswered Eduardo Dornel 370 -
0
votes1
answer262
viewsA: Request error with complex object
public class SuaClasse implements Serializable And if your class has other classes, you will also need to add the implements Serializable in them
-
0
votes1
answer46
viewsA: I’m Having Trouble Opening a New Activity after taking a photo with android studio
Try that way inside your onActivityResult: if (resultCode == RESULT_OK && requestCode == TAKE_PICTURE_RC) { Uri photoUri; if (data != null && data.getData() != null) { photoUri =…
-
0
votes1
answer277
viewsA: Show Progressibar when logging into Firebase
In the first line of the method efetuarLogin() add: final ProgressDialog dialog = ProgressDialog.show(this, "Titulo", "Texto", true); Then inside your own onComplete() add: dialog.dismiss();…
-
1
votes1
answer51
viewsA: Counting records with Room and Livedata in android studio
What error are you getting ? well it seems to me that you are trying to run the code on Main Thread, which Google does not recommend. Try it this way: Executors.newSingleThreadExecutor().execute(new…
-
1
votes1
answer147
viewsQ: Jquery statement that returns the last Child of different elements
Hi, I’m doing some exercises for a programming course I took. I came across this task and do not know how to solve it, someone has some hint? Make a jQuery statement that selects all elements that…
-
1
votes2
answers686
viewsA: Change position image with transition when mouse over it?
Inside the Hover insert a transition: 5s; and put as many seconds as you want for the transition to be done.. you can still add one transform: rotate(720deg); that your image will rotate from side…
-
0
votes1
answer30
viewsA: record does not update with EF
Lacked a contexto.SaveChanges(); under the db.Entry(obj).State = EntityState.Modified;
-
1
votes2
answers1514
viewsQ: Calculate length of a Sqlserver field
Hello, I have a table in SQL with the word column and a column sizeDaPalavra, I was wondering if you have any way to register the word in the database and execute a function that calculates the…
-
1
votes1
answer960
viewsQ: How to sort an array of objects in java
Hello, I have a class teams where they have scores (int), winning number (int), defeats (int) etc. Within the method main, I have an array of 20 teams and need to sort them by the score, if the…