2011-10-25 26 views
0

リストビューの子を強調表示できますか? 私は多くの方法を試みましたが、うまくいきません。リストビューの子をハイライト表示

list.getchildat(position).requestFocus; 

list.setSelection(位置)。

とlist.setselected( "true")。

お願いします。

+0

はhttp://developer.android.com/resources/samples/ApiDemos/src/comを見てみてください/example/android/apis/view/List17.html – Warpzit

答えて

0

これはあなたの答えであるかもしれない:APIのdemes見

@Override protected void onListItemClick(ListView l, View v, int position, long id) {  // Make the newly clicked item the currently selected one.  getListView().setItemChecked(position, true); } 

ゴー:http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List17.html

+0

私のアプリケーションを起動すると、何もせずにクリックすることなく、3番目の項目をフォーカスしたい – Vervatovskis

関連する問題