mirror of https://github.com/M66B/FairEmail.git
Added close button to settings
This commit is contained in:
parent
8efde8ae2c
commit
5351484935
|
@ -211,8 +211,7 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
menus.add(new NavMenuItem(R.drawable.twotone_close_24, R.string.title_setup_close, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
drawerLayout.closeDrawer(drawerContainer, false);
|
||||
onBackPressed();
|
||||
onMenuClose();
|
||||
}
|
||||
}).setColor(colorWarning).setSeparated());
|
||||
|
||||
|
@ -446,6 +445,10 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
if (drawerToggle.onOptionsItemSelected(item))
|
||||
return true;
|
||||
|
||||
int itemId = item.getItemId();
|
||||
if (itemId == R.id.menu_close)
|
||||
onMenuClose();
|
||||
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
|
@ -477,6 +480,11 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
|||
}
|
||||
}
|
||||
|
||||
private void onMenuClose() {
|
||||
drawerLayout.closeDrawer(drawerContainer, false);
|
||||
onBackPressed();
|
||||
}
|
||||
|
||||
private void onMenuExport() {
|
||||
if (ActivityBilling.isPro(this))
|
||||
askPassword(true);
|
||||
|
|
|
@ -7,4 +7,9 @@
|
|||
android:title="@string/title_search"
|
||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||
app:showAsAction="collapseActionView|always" />
|
||||
<item
|
||||
android:id="@+id/menu_close"
|
||||
android:icon="@drawable/twotone_close_24"
|
||||
android:title="@string/title_setup_close"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
|
|
Loading…
Reference in New Issue