@Override
public void onDrawerClosed(@NonNull View drawerView) {
+ // Reset the drawer icon when the drawer is closed. Otherwise, it is an arrow if the drawer is open when the app is restarted.
+ actionBarDrawerToggle.syncState();
}
@Override
}
private void addNewTab(String url, boolean moveToTab) {
+ // Clear the focus from the URL edit text, so that it will be populated with the information from the new tab.
+ urlEditText.clearFocus();
+
// Get the new page number. The page numbers are 0 indexed, so the new page number will match the current count.
int newTabNumber = tabLayout.getTabCount();
if (webViewPagerAdapter.deletePage(currentTabNumber, webViewPager)) {
setCurrentWebView(currentTabNumber);
}
-
- // Expand the app bar if it is currently collapsed.
- appBarLayout.setExpanded(true);
}
private void saveWebpageArchive(String filePath) {