mirror of https://github.com/M66B/FairEmail.git
Added advanced options action bar menu
This commit is contained in:
parent
8c5d26643e
commit
7758cdf2c6
|
@ -360,6 +360,9 @@ public class FragmentSetup extends FragmentBase {
|
|||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case R.id.menu_advanced:
|
||||
onMenuAdvanced();
|
||||
return true;
|
||||
case R.id.menu_help:
|
||||
onMenuHelp();
|
||||
return true;
|
||||
|
@ -368,6 +371,12 @@ public class FragmentSetup extends FragmentBase {
|
|||
}
|
||||
}
|
||||
|
||||
private void onMenuAdvanced() {
|
||||
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, new FragmentOptions()).addToBackStack("options");
|
||||
fragmentTransaction.commit();
|
||||
}
|
||||
|
||||
private void onMenuHelp() {
|
||||
startActivity(getIntentHelp());
|
||||
}
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item
|
||||
android:id="@+id/menu_advanced"
|
||||
android:icon="@drawable/baseline_settings_applications_24"
|
||||
android:title="@string/title_setup_advanced"
|
||||
app:showAsAction="always" />
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_help"
|
||||
android:icon="@drawable/baseline_help_24"
|
||||
|
|
Loading…
Reference in New Issue