一個recycleView里有editview和radioButton,在每次點擊radioButton的時候會滾回到editView,體驗很不好
初步判斷是editView搶占了焦點,一直在editView上,所以導(dǎo)致一直在editView上,希望的結(jié)果是每次點擊radioButton的時候,可以不要滾動,
所以我就在每次點擊radioButton的時候加上焦點
chooseBtn.setFocusable(true);
chooseBtn.setFocusableInTouchMode(true);
chooseBtn.requestFocus();
chooseBtn.findFocus();
然后就好了!
中間誤入了很長一點時間想要去掉editView的焦點,然后又要去掉radio的焦點,然后走入死胡同了,其實只要每次焦點在當前操作的控件上就好了!