Make a subclass of TabHost, and override dispatchWindowFocusChanged that makes webview clear focus.
This class will make your html select work, but the "Window already focused, ignoring focus gain of" log will be left.
public class CustomeTabHost extends TabHost {
public CustomeTabHost(final Context context, final AttributeSet attrs) {
super(context, attrs);
}
public CustomeTabHost(final Context context) {
this(context, null);
}
@Override
public void dispatchWindowFocusChanged(final boolean paramBoolean)
{
// focusedView should be webview
View focusedView = ((Activity)getContext()).getCurrentFocus();
if (focusedView != null) {
focusedView.clearFocus();
}
if (getCurrentView() == null) {
return;
}
super.dispatchWindowFocusChanged(paramBoolean);
}
}
在 2012年8月24日星期五UTC+9上午11时39分11秒,そうめい写道: