2013-10-21 45 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);