Posts by Pedro Eduardo • 108 points
7 posts
-
0
votes1
answer98
viewsQ: The last Listview item is always deleted even by deleting an item in the middle of Arraylist
I own a Adapter any and by clicking on an delete icon, the item in my ArrayList is removed. The problem is that even by removing the desired item, the ListView is updated, always removing the last…
-
3
votes1
answer1283
viewsA: Android Studio Error 1.5.1
Try to lower the Android Support Tools: Open the SDK manager; click on the "SDK Tools tab"; check item "Android Support Library"; Click on "Apply".…
-
2
votes2
answers724
viewsA: How to change the color of a Listview item while it is being pressed?
Create a selector for your list, with the desired colors for clicks, longClicks, etc: <?xml version="1.0" encoding="utf-8"?> <selector…
-
2
votes2
answers271
viewsA: Linear Clickable Layout
LinearLayout meuComponente = (LinearLayout) findViewById (R.id.meu_componente); meuComponente.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) {…
-
1
votes2
answers246
viewsA: Upload xml file to Gridview?
By pressing your Activity button, you could call a new Activity, containing the desired gridview. Example: btnOpen.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0)…
-
1
votes2
answers246
viewsA: Upload xml file to Gridview?
To work with Gridviews, you will need four things: A Activity (you already have), an Adapter class, which will contain the contents of each cell on your grid, an xml file containing the layout of…
-
0
votes3
answers57
viewsA: How to prevent the user to enter a "." point before any number?
Try to use, for mathematical calculations, the Bigdecimal. In addition to working accurately, it has good interaction with views. Try this: String strValue = myTextView.getText().toString();…
androidanswered Pedro Eduardo 108