【发布时间】:2014-01-08 17:50:23
【问题描述】:
在具有导航抽屉的 android 活动中清除焦点的最佳方法是什么。
问题在于,当用户选择了一个文本框时,如果您打开导航抽屉后退事件,它不会被抽屉使用,并且导航会后退一步,使抽屉打开。
现在我解决了在活动中使用它的问题,但我想知道是否有人使用我不需要使用 ActionBarDrawerToggle 事件的其他解决方案。
/** Called when a drawer has settled in a completely open state. */
public void onDrawerOpened(View drawerView) {
View window = findViewById(R.id.content_frame);
window.clearFocus();
}
【问题讨论】:
-
你有没有找到一个干净的解决方案?
标签: android focus navigation-drawer