From d08c9b34bbb102bddedbbd05814b666092ea2fe3 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 10 Feb 2019 20:29:42 +0000 Subject: [PATCH] Added options button --- .../main/java/eu/faircode/email/FragmentSetup.java | 11 +++++++++++ app/src/main/res/layout/fragment_setup.xml | 11 +++++++++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 23 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index 6b236503a9..431c36d477 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -71,6 +71,7 @@ public class FragmentSetup extends FragmentBase { private Button btnData; + private Button btnOptions; private Button btnInbox; private int textColorPrimary; @@ -111,6 +112,7 @@ public class FragmentSetup extends FragmentBase { btnData = view.findViewById(R.id.btnData); + btnOptions = view.findViewById(R.id.btnOptions); btnInbox = view.findViewById(R.id.btnInbox); // Wire controls @@ -183,6 +185,15 @@ public class FragmentSetup extends FragmentBase { } }); + btnOptions.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); + fragmentTransaction.replace(R.id.content_frame, new FragmentOptions()).addToBackStack("options"); + fragmentTransaction.commit(); + } + }); + btnInbox.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { diff --git a/app/src/main/res/layout/fragment_setup.xml b/app/src/main/res/layout/fragment_setup.xml index 5689422f04..8b3cfa4a8c 100644 --- a/app/src/main/res/layout/fragment_setup.xml +++ b/app/src/main/res/layout/fragment_setup.xml @@ -369,6 +369,17 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toEndOf="@id/five" /> +