1
我在我的项目中有一个侧栏,其中有一些设置用于我的主页。
我希望当我的设置在边栏中更改时,我会在主页面中模拟这种更改。
当然我看到这个梅索德如何在Eclipse中的侧边栏中获取更改
mDrawerToggle = new ActionBarDrawerToggle(this, mDrawerLayout, R.drawable.ic_drawer ,R.string.drawer_open,R.string.drawer_close){
/** Called when drawer is closed */
public void onDrawerClosed(View view) {
supportInvalidateOptionsMenu();
}
/** Called when a drawer is opened */
public void onDrawerOpened(View drawerView) {
supportInvalidateOptionsMenu();
}
};
但我的问题是,当用户触摸任何地方在屏幕侧边栏以外,侧边栏将关闭,该方法不会被调用。 那么,怎样才能解决呢?感谢您的帮助