Friday, July 5, 2013

[android help] android: chaotic selection in ListView


android: chaotic selection in ListView



in my application I have a ListView and ArrayAdapter.


When I select some one element in ListView I can see also few more selected elements.


Furthermore, when I scroll elements in ListView (after selection) then my selection disappears and elements are selected randomly.


Code of adapter:




final ListAdapter adapter = new ArrayAdapter(activity, R.layout.simple_list_item_multiple_choice, locationComponents) {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if ( convertView == null ) {
convertView = layoutInflater.inflate(layout.simple_test_layout_with_one_text_field, null);
}
return convertView;
}
};



Looks like some parameters have to be set.


Could you please help me to avoid this problem?



Read more

stackoverflow.comm



No comments:

Post a Comment

Google Voice on T-Mobile? [General]

Google Voice on T-Mobile? So I recently switched from a GNex on Verizon to a Moto X DE on T-Mobile. I had always used Google Voice for my v...