0
我在ExpandableListView, 的每一個子項目一個EditText,但有一個問題: 當我點擊的EditText,有時光標正常閃爍, 但有時光標不會出現, 或光標顯示但不閃爍。光標的EditText在ExpandableListView的不閃爍或出現
我試過很多方法,但沒有人工作。
下面是我試過的方法,但不工作:
一套用於兒童的每一項的EditText在Java中
View.OnFocusChangeListener onFocus = new View.OnFocusChangeListener() { @Override public void onFocusChange(View v, boolean hasFocus) { v.dispatchWindowFocusChanged(hasFocus); } };
一套用於ExpandableListView
android:descendantFocusability="afterDescendants" android:focusable="false"
設置爲xml中的子項目
android:textCursorDrawable="@null" android:cursorVisible="true"
我不知道這個問題的想法,請大家幫忙,非常感謝~~~
是否在子項中添加了android:focusableInTouchMode =「true」和android:focusable =「false」? – Nas
@Nas謝謝〜我只是試過你的代碼,它不起作用。 TAT – DawnYu
您是否找到任何解決方案? – Ircover