0

エミュレーターでデータを消去してアプリを実行すると、ListView常に最初の行がフォーカスされます。つまり、オレンジ色の選択があります。どうすればそれを取り除くことができるか、誰にも考えがありますか?代わりにフォーカスをリクエストできるものがありませんEditTexts。些細なことだと思いますが、解決策が見つからないようです。ViewsActivity

4

2 に答える 2

2

あなたはそのようにすることができます:

ListView listView = (ListView)....;
listView.clearFocus();
于 2012-11-01T09:09:31.870 に答える
0

Add this to your listview xml

<ListView
.................

android:cacheColorHint="@android:color/transparent" 
android:listSelector="@android:color/transparent"
/>

This will make the listview divider color to transparent. So it will not be seen as selected.

于 2012-11-01T09:12:09.197 に答える