androidparse-platformandroid-parsequeryadapter

How do I make my ParseQueryAdapter items selectable?


Can anyone tell me how to make text items selectable ?

Here is my current adapter code:

final ParseQueryAdapter adapter = new ParseQueryAdapter(this, "Prem");
adapter.setTextKey("des");

ListView listView = (ListView) findViewById(R.id.newslistview);
listView.setAdapter(adapter);

What is missing ?


Solution

  • The ListViews default choice mode should be set to CHOICE_MODE_SINGLE which means it should allow you to select one item. I suppose this could be affecte by ParseQueryAdapters pagination. Try to disable it with adapter.setPaginationEnabled(false). Also call setChoiceMode() manually on your ListView to specify it.