2013-10-21 80 views

回答

0

在ScrollState變更確認鍵盤打開與否:

public void onScrollStateChanged(AbsListView view, int scrollState) { 
    //check keyboard is open?  
InputMethodManager imm = (InputMethodManager) getActivity() 
     .getSystemService(Context.INPUT_METHOD_SERVICE); 

if (imm.isAcceptingText()) { 
    writeToLog("Software Keyboard was shown"); 
} else { 
    writeToLog("Software Keyboard was not shown"); 
} 
} 

,並停止與列表視圖

listView.setScrollContainer(false);