I have a listView with a custom adapter. I've made the listView item's background change color when selected. This works perfectly on Ice Cream Sandwich 4.0.4 on Samsung Galaxy S2 and on ICS 4.0.3 on emulator. But it does not work on 4.2.2 JellyBean emulator.
I have a ListView with a onListItemListener, I have it so if you tap a ListView Item it removes it, but for some reason if I remove the last item form the list, the app crashes and gives me this error (java.lang.IndexOutOfBoundsException: Invalid index 3, size is 3)
Does anyone have any idea what that means?
This is my code:
@Override
protected void onListItemClick(ListView l, Vie
Trying to put a header in a ListFragment like this
@Override
public View onCreateView(org.holoeverywhere.LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View listRoot = inflater.inflate(R.layout.list, null);
headerView = inflater.inflate(R.layout.header);
return listRoot;
}
In onActivityCreated
@Override
public void onActivityCreated(Bundle savedInstanceS
I want to create a multiple-choice listview; associate the listview to a contextual menu. The menu has a delete item. When I choose the delete item on the menu, the selected items in the listview must be deleted; of course the listview will appear without the deleted items, but I have problem when selecting delete item.
Well I want to highlight the view so the user can see which item it have selected. I tried like this:
View.setBackground(COLOR.RED);
Inside listView on item click listener and it works, but if the list get scrolled random views start changing backgrounds.
Hello everyone
I'am trying to implement a listview and what I want exactly is :
The app launches, 1 item from ListView is being chosed and starts a webview. This step is done
But this what I want is that 2.time when I launch the app, it will start from that item and not showing the list again.
I have a ListFragment and I want to edit item when clicked in List View.
This is psuedo code of my List Fragment.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
// Inflate the layout for this fragment
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.setHasOptionsMenu(true);
I'm using a ListView to display a list of items. I tap on one item to 'select' it, and that item briefly turns orange in the list, but then returns to the background color.
How can I cause the item to stay 'lit' until I unselect it (by tapping the item again)?
Also, can I call a method that will clear all selected items for that list?
I have a problem with a simple ListView on a Samsung phone.
I create a new ListView programmatically. The items are simple TextView.