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() {
|
menus.add(new NavMenuItem(R.drawable.twotone_close_24, R.string.title_setup_close, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
drawerLayout.closeDrawer(drawerContainer, false);
|
onMenuClose();
|
||||||
onBackPressed();
|
|
||||||
}
|
}
|
||||||
}).setColor(colorWarning).setSeparated());
|
}).setColor(colorWarning).setSeparated());
|
||||||
|
|
||||||
|
@ -446,6 +445,10 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||||
if (drawerToggle.onOptionsItemSelected(item))
|
if (drawerToggle.onOptionsItemSelected(item))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
int itemId = item.getItemId();
|
||||||
|
if (itemId == R.id.menu_close)
|
||||||
|
onMenuClose();
|
||||||
|
|
||||||
return super.onOptionsItemSelected(item);
|
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() {
|
private void onMenuExport() {
|
||||||
if (ActivityBilling.isPro(this))
|
if (ActivityBilling.isPro(this))
|
||||||
askPassword(true);
|
askPassword(true);
|
||||||
|
|
|
@ -7,4 +7,9 @@
|
||||||
android:title="@string/title_search"
|
android:title="@string/title_search"
|
||||||
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
app:actionViewClass="androidx.appcompat.widget.SearchView"
|
||||||
app:showAsAction="collapseActionView|always" />
|
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>
|
</menu>
|
||||||
|
|
Loading…
Reference in New Issue