Posts by Leandro Araujo • 121 points
8 posts
-
0
votes1
answer30
viewsA: Onitemclicklistener with Customadapter, java.lang.Nullpointerexception error:
You did not initialize the Adapter object, you are creating an Adapter instance directly in the setAdapter method. To solve you can replace lvPosts.setAdapter(new AdapterListView(MainActivity.this,…
-
0
votes2
answers435
viewsA: How to focus position using Recyclerview?
Store the position of the clicked item and when back you can set a scroll to the position: recyclerView.scrollToPosition(position);
-
1
votes1
answer315
viewsQ: Error inflating menu in navigation Drawer in Nougat and Oreo version
Hello, I have a problem with Android Navigationdrawer in versions 7 or higher. When I add the menu via xml, an Exception is generated. However, in the MARSHMALLOW version it works correctly. Follows…
-
1
votes2
answers161
viewsA: How to create an ID to be used in other classes
You can store in a Shared Preferences, although I’m not sure it’s the best option: // Inicializar SharedPreferences sharedPreferences = getSharedPreferences("shared_pref_key", Context.MODE_PRIVATE);…
-
0
votes3
answers181
viewsA: Difference between two codes
Basically, the first option spends less processing power, because the compiler goes straight through the conditions without getting into conditional daughters.
-
2
votes1
answer110
viewsA: Error using Sanitize function
The data you are passing is arrays? foreach works only with arrays. You should check if the input variable is an array to run the foreach. static public function filter($value, $modes = array('sql',…
phpanswered Leandro Araujo 121 -
0
votes2
answers2299
viewsA: Make all LI to the height of the largest using CSS
You can set the property min-height a value according to the content. Ex.: if your major li has 200px, set: li { min-height: 200px; }
-
5
votes1
answer110
viewsA: Query to join specific tables
Try replacing Inner with LEFT JOIN select * from contato left join contato_email on (contato.id_contato = contato_email.id_contato)