mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
feat: Close tab switcher on clicking again
This commit is contained in:
parent
6c9794f70f
commit
c952779e80
@ -1526,7 +1526,14 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
||||
View tabSwitcher = menu.findItem(R.id.menu_tab_switcher).getActionView();
|
||||
tabSwitcherIcon = tabSwitcher.findViewById(R.id.ic_tab_switcher_text);
|
||||
updateTabSwitcherIcon();
|
||||
tabSwitcher.setOnClickListener(v -> showTabSwitcher());
|
||||
tabSwitcher.setOnClickListener(v -> {
|
||||
if (tabSwitcherRoot.getVisibility() == View.VISIBLE) {
|
||||
hideTabSwitcher();
|
||||
selectTab(currentWebViewIndex);
|
||||
} else {
|
||||
showTabSwitcher();
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user