Skip to content

Instantly share code, notes, and snippets.

@jiemachina
Created September 11, 2012 04:10
Show Gist options
  • Save jiemachina/3695896 to your computer and use it in GitHub Desktop.
Save jiemachina/3695896 to your computer and use it in GitHub Desktop.
webview中的组件可以编辑,因为mEditText组件已经获得焦点,所以先除去焦点,然后再分配可以有焦点,
mWebView.requestFocus(View.FOCUS_DOWN);
//先是去焦点,然后再给焦点去对焦
mEditText.setFocusable(false);
mEditText.setFocusableInTouchMode(true);
mEditText.setFocusable(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment