數字鍵盤三

//解決辦法
et_qujian_phone_send.postDelayed(new Runnable() {
    @Override
    public void run() {
        et_qujian_phone_send.requestFocus();
        disableShowInput(et_qujian_phone_send);
    }
}, 500);

https://www.cnblogs.com/pangguoming/p/5788131.htmlhtml

 

 爲某個控件如EditText設置requestfocus()的時候無論用,好比說登錄的時候,我判斷下用戶輸入的密碼,若是正確就登錄,錯誤就提示密碼錯誤,而且輸入框獲取焦點,可是實際中確不起做用。ide

多是如下問題: 
Android加載刷新UI的時候,是從左到右,從上到下的順序,正在加載的過程當中,若是此時requestFocus(),的話,有可能此時還沒把整個界面刷新好,致使requestFocus無效。post

相關文章
相關標籤/搜索