android Programming Glossary: selectedindex
Android - Keep ListView's item highlighted once one has been clicked http://stackoverflow.com/questions/9281000/android-keep-listviews-item-highlighted-once-one-has-been-clicked public class TestAdapter extends BaseAdapter private Context context private ArrayList TestList testList private int selectedIndex private int selectedColor Color.parseColor #1b1b1b public TestAdapter Context ctx ArrayList TestList testList this.context.. #1b1b1b public TestAdapter Context ctx ArrayList TestList testList this.context ctx this.testList testList selectedIndex 1 public void setSelectedIndex int ind selectedIndex ind notifyDataSetChanged @Override public int getCount return testList.size.. TestList testList this.context ctx this.testList testList selectedIndex 1 public void setSelectedIndex int ind selectedIndex ind notifyDataSetChanged @Override public int getCount return testList.size @Override public Object getItem int position..
|