fix menu not being refreshed when closing slidingmenu by dragging

This commit is contained in:
Andrew Dolgov 2013-11-21 09:46:27 +04:00
parent d4caac40d4
commit 0d6b35373d
2 changed files with 15 additions and 0 deletions

View File

@ -77,6 +77,8 @@ public class FeedsActivity extends OnlineActivity implements HeadlinesEventListe
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
m_actionbarUpEnabled = true; m_actionbarUpEnabled = true;
m_feedIsSelected = true; m_feedIsSelected = true;
initMenu();
} }
}); });

View File

@ -57,6 +57,19 @@ public class OfflineFeedsActivity extends OfflineActivity implements OfflineHead
m_slidingMenu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT); m_slidingMenu.attachToActivity(this, SlidingMenu.SLIDING_CONTENT);
m_slidingMenu.setSlidingEnabled(true); m_slidingMenu.setSlidingEnabled(true);
m_slidingMenu.setMenu(R.layout.feeds); m_slidingMenu.setMenu(R.layout.feeds);
m_slidingMenu.setOnClosedListener(new SlidingMenu.OnClosedListener() {
@Override
public void onClosed() {
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
m_actionbarUpEnabled = true;
m_feedIsSelected = true;
initMenu();
}
});
m_slidingMenu.setOnOpenedListener(new SlidingMenu.OnOpenedListener() { m_slidingMenu.setOnOpenedListener(new SlidingMenu.OnOpenedListener() {
@Override @Override