Commit 06851a14 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf
Browse files

Hide menu when clicking on already shown fragment

parent cd28c61a
......@@ -195,9 +195,11 @@ public class MainActivity extends SherlockFragmentActivity {
int position, long id) {
SidebarAdapter.SidebarEntry entry = (SidebarEntry) listView.getItemAtPosition(position);
Fragment current = getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder);
if(current == null || current.getTag() == entry.id) /* Already selected */
if(current == null || current.getTag() == entry.id) { /* Already selected */
mMenu.showAbove();
return;
}
/* Clear any backstack before switching tabs.
* This way it's more consistent for the user, who might have
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment