diff --git a/app/src/main/java/com/breadwallet/presenter/activities/DisabledActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/DisabledActivity.java index d797e73b7..93cba38eb 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/DisabledActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/DisabledActivity.java @@ -129,5 +129,7 @@ public void onBackPressed() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + } + } -} diff --git a/app/src/main/java/com/breadwallet/presenter/activities/InputWordsActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/InputWordsActivity.java index 3bf3460d0..6aecb4a19 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/InputWordsActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/InputWordsActivity.java @@ -352,9 +352,10 @@ private void clearWords() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } - private class FocusListener implements View.OnFocusChangeListener { + private class FocusListener implements View.OnFocusChangeListener { @Override public void onFocusChange(View v, boolean hasFocus) { diff --git a/app/src/main/java/com/breadwallet/presenter/activities/PaperKeyActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/PaperKeyActivity.java index c2ea83259..87d12b0e8 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/PaperKeyActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/PaperKeyActivity.java @@ -212,5 +212,6 @@ public int getCount() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } -} +} \ No newline at end of file diff --git a/app/src/main/java/com/breadwallet/presenter/activities/PaperKeyProveActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/PaperKeyProveActivity.java index 8b617b7d5..ff11d6df3 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/PaperKeyProveActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/PaperKeyProveActivity.java @@ -208,6 +208,7 @@ private boolean isWordCorrect(boolean first) { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } // private class FocusListener implements View.OnFocusChangeListener { diff --git a/app/src/main/java/com/breadwallet/presenter/activities/ReEnterPinActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/ReEnterPinActivity.java index b1957deae..a3ceadf97 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/ReEnterPinActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/ReEnterPinActivity.java @@ -179,5 +179,6 @@ public void onComplete() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } } diff --git a/app/src/main/java/com/breadwallet/presenter/activities/SetPinActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/SetPinActivity.java index e3c3f9097..4b5299ae2 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/SetPinActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/SetPinActivity.java @@ -148,5 +148,7 @@ public void run() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); + } } diff --git a/app/src/main/java/com/breadwallet/presenter/activities/UpdatePinActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/UpdatePinActivity.java index 5d57868ee..cde1ea0cd 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/UpdatePinActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/UpdatePinActivity.java @@ -201,5 +201,6 @@ private void setMode(int mode) { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } } diff --git a/app/src/main/java/com/breadwallet/presenter/activities/camera/CameraActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/camera/CameraActivity.java index ed1637c7e..6c4f73da0 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/camera/CameraActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/camera/CameraActivity.java @@ -957,5 +957,6 @@ public void onBackPressed() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } } \ No newline at end of file diff --git a/app/src/main/java/com/breadwallet/presenter/activities/camera/ScanQRActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/camera/ScanQRActivity.java index fd25dc49c..659537c25 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/camera/ScanQRActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/camera/ScanQRActivity.java @@ -172,5 +172,6 @@ private void initQRCodeReaderView() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } } \ No newline at end of file diff --git a/app/src/main/java/com/breadwallet/presenter/activities/intro/IntroActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/intro/IntroActivity.java index b0d0c9b3f..ace0122f1 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/intro/IntroActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/intro/IntroActivity.java @@ -226,7 +226,7 @@ protected void onPause() { @Override protected void onSaveInstanceState(Bundle outState) { - + super.onSaveInstanceState(outState); } @Override diff --git a/app/src/main/java/com/breadwallet/presenter/activities/intro/RecoverActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/intro/RecoverActivity.java index 686f521a3..5dd16d4f8 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/intro/RecoverActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/intro/RecoverActivity.java @@ -61,5 +61,6 @@ public void onBackPressed() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } } diff --git a/app/src/main/java/com/breadwallet/presenter/activities/intro/WriteDownActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/intro/WriteDownActivity.java index dd915559e..47aa19e49 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/intro/WriteDownActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/intro/WriteDownActivity.java @@ -17,7 +17,8 @@ public class WriteDownActivity extends BRActivity { private Button writeButton; - private ImageButton close; + private ImageButton closeButton; + public static boolean appVisible = false; private static WriteDownActivity app; @@ -31,14 +32,27 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_write_down); writeButton = (Button) findViewById(R.id.button_write_down); - close = (ImageButton) findViewById(R.id.close_button); - close.setOnClickListener(new View.OnClickListener() { +// close = (ImageButton) findViewById(R.id.close_button); +// close.setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View v) { +// close(); +// } +// }); + + closeButton = (ImageButton) findViewById(R.id.close_button); + closeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - close(); + onBackPressed(); } }); +// public void onBackPressed() { +// super.onBackPressed(); +// overridePendingTransition(R.anim.fade_up, R.anim.exit_to_bottom); +// } + //TODO: all views are using the layout of this button. Views should be refactored without it // Hiding until layouts are built. ImageButton faq = (ImageButton) findViewById(R.id.faq_button); @@ -78,6 +92,7 @@ protected void onPause() { @Override public void onBackPressed() { + super.onBackPressed(); if (getFragmentManager().getBackStackEntryCount() == 0) { close(); } else { @@ -93,6 +108,7 @@ private void close() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } } diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/AboutActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/AboutActivity.java index 7bdd01df8..39abeac5a 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/AboutActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/AboutActivity.java @@ -6,6 +6,7 @@ import android.net.Uri; import android.os.Bundle; import android.view.View; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.TextView; @@ -29,6 +30,8 @@ public class AboutActivity extends BRActivity { private ImageView blogShare; private static AboutActivity app; + private ImageButton closeButton; + public static AboutActivity getApp() { return app; } @@ -37,6 +40,7 @@ public static AboutActivity getApp() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } @Override @@ -85,6 +89,14 @@ public void onClick(View v) { } }); + closeButton = (ImageButton) findViewById(R.id.close_button); + closeButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + onBackPressed(); + } + }); + } @Override diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/AdvancedActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/AdvancedActivity.java index 8b4ce7079..8e6543baa 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/AdvancedActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/AdvancedActivity.java @@ -128,6 +128,7 @@ public void onClick(View v) { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } @Override diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/DisplayCurrencyActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/DisplayCurrencyActivity.java index 014bbb189..3cbe551d5 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/DisplayCurrencyActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/DisplayCurrencyActivity.java @@ -41,12 +41,15 @@ public class DisplayCurrencyActivity extends BRActivity { private Button leftButton; private Button rightButton; + private ImageButton closeButton; + public static DisplayCurrencyActivity getApp() { return app; } @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } @Override @@ -100,6 +103,15 @@ public void onItemClick(AdapterView parent, View view, }); listView.setAdapter(adapter); adapter.notifyDataSetChanged(); + + + closeButton = (ImageButton) findViewById(R.id.close_button); + closeButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + onBackPressed(); + } + }); } private void updateExchangeRate() { diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/FingerprintActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/FingerprintActivity.java index 962a6b5d3..794b9c0b0 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/FingerprintActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/FingerprintActivity.java @@ -49,6 +49,7 @@ public static FingerprintActivity getApp() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } @Override diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/ImportActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/ImportActivity.java index 9db1276dd..0155bbf55 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/ImportActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/ImportActivity.java @@ -18,7 +18,7 @@ public class ImportActivity extends BRActivity { private static final String TAG = ImportActivity.class.getName(); public static boolean appVisible = false; private static ImportActivity app; - private ImageButton close; + private ImageButton closeButton; public static ImportActivity getApp() { return app; @@ -31,8 +31,8 @@ protected void onCreate(Bundle savedInstanceState) { setContentView(R.layout.activity_import); scan = (Button) findViewById(R.id.scan_button); - close = (ImageButton) findViewById(R.id.close_button); - close.setOnClickListener(new View.OnClickListener() { + closeButton = (ImageButton) findViewById(R.id.close_button); + closeButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { onBackPressed(); @@ -67,6 +67,7 @@ protected void onPause() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } @Override diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/NodesActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/NodesActivity.java index 24e9b7519..75a256aae 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/NodesActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/NodesActivity.java @@ -61,6 +61,7 @@ public static NodesActivity getApp() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } @Override diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/NotificationActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/NotificationActivity.java index 6fa852479..cffd9158c 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/NotificationActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/NotificationActivity.java @@ -21,6 +21,7 @@ public static NotificationActivity getApp() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } @Override diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/SecurityCenterActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/SecurityCenterActivity.java index d32df52b9..8481ddc4a 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/SecurityCenterActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/SecurityCenterActivity.java @@ -47,6 +47,7 @@ public static SecurityCenterActivity getApp() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } @Override diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/SettingsActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/SettingsActivity.java index 3ad153757..a5b2b0662 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/SettingsActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/SettingsActivity.java @@ -8,14 +8,20 @@ import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; +import android.widget.CompoundButton; +import android.widget.ImageButton; import android.widget.ListView; +import android.widget.RelativeLayout; import android.widget.TextView; +import android.widget.ToggleButton; import androidx.annotation.LayoutRes; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.breadwallet.R; +import com.breadwallet.presenter.activities.DisabledActivity; +import com.breadwallet.presenter.activities.InputWordsActivity; import com.breadwallet.presenter.language.ChangeLanguageBottomSheet; import com.breadwallet.presenter.activities.util.BRActivity; import com.breadwallet.presenter.entities.BRSettingsItem; @@ -35,18 +41,21 @@ public class SettingsActivity extends BRActivity { private ListView listView; public List items; public static boolean appVisible = false; + private ImageButton closeButton; private static SettingsActivity app; - public static SettingsActivity getApp() { return app; } - @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_settings); + listView = findViewById(R.id.settings_list); + + closeButton = (ImageButton) findViewById(R.id.close_button); + closeButton.setOnClickListener(v -> finish()); } public class SettingsListAdapter extends ArrayAdapter { diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/ShareDataActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/ShareDataActivity.java index 3343da063..74893fe6d 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/ShareDataActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/ShareDataActivity.java @@ -56,6 +56,7 @@ public void onBackPressed() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } } diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/SpendLimitActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/SpendLimitActivity.java index ace423d24..731a22d50 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/SpendLimitActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/SpendLimitActivity.java @@ -39,8 +39,11 @@ public class SpendLimitActivity extends BRActivity { private ListView listView; private LimitAdaptor adapter; + private ImageButton closeButton; + @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } public static SpendLimitActivity getApp() { @@ -56,6 +59,7 @@ protected void onCreate(Bundle savedInstanceState) { // Hiding until layouts are built. ImageButton faq = findViewById(R.id.faq_button); + closeButton = (ImageButton) findViewById(R.id.close_button); listView = findViewById(R.id.limit_list); listView.setFooterDividersEnabled(true); adapter = new LimitAdaptor(this); @@ -83,6 +87,13 @@ public void onItemClick(AdapterView parent, View view, }); listView.setAdapter(adapter); adapter.notifyDataSetChanged(); + + closeButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + onBackPressed(); + } + }); } //satoshis diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/SyncBlockchainActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/SyncBlockchainActivity.java index 3449d1ece..8c9fd4b96 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/SyncBlockchainActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/SyncBlockchainActivity.java @@ -34,6 +34,8 @@ public class SyncBlockchainActivity extends BRActivity { private Button semiPrivateButton; private Button anonymousButton; + private ImageButton closeButton; + private RadioGroup syncRadioGroup; public static boolean appVisible = false; @@ -46,6 +48,7 @@ public static SyncBlockchainActivity getApp() { } @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } private void updateSyncPreference() { @@ -137,6 +140,14 @@ public void onClick(BRDialogView brDialogView) { } }); + closeButton = (ImageButton) findViewById(R.id.close_button); + closeButton.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + onBackPressed(); + } + }); + } diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/TestActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/TestActivity.java index b0d667d8a..30af84aa2 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/TestActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/TestActivity.java @@ -11,6 +11,7 @@ public class TestActivity extends BRActivity { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } @Override diff --git a/app/src/main/java/com/breadwallet/presenter/activities/settings/WipeActivity.java b/app/src/main/java/com/breadwallet/presenter/activities/settings/WipeActivity.java index 1c88066ef..bf9954a36 100644 --- a/app/src/main/java/com/breadwallet/presenter/activities/settings/WipeActivity.java +++ b/app/src/main/java/com/breadwallet/presenter/activities/settings/WipeActivity.java @@ -77,5 +77,6 @@ public void onBackPressed() { @Override protected void onSaveInstanceState(Bundle outState) { + super.onSaveInstanceState(outState); } } diff --git a/app/src/main/java/com/breadwallet/presenter/fragments/FragmentSend.kt b/app/src/main/java/com/breadwallet/presenter/fragments/FragmentSend.kt index 63608cdd4..fd2a733bc 100644 --- a/app/src/main/java/com/breadwallet/presenter/fragments/FragmentSend.kt +++ b/app/src/main/java/com/breadwallet/presenter/fragments/FragmentSend.kt @@ -132,6 +132,7 @@ class FragmentSend : Fragment() { val faq = rootView.findViewById(R.id.faq_button) as ImageButton showKeyboard(false) signalLayout.layoutTransition = BRAnimator.getDefaultTransition() + return rootView } diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 59954f089..cd9dd0943 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -183,4 +183,15 @@ app:layout_constraintTop_toTopOf="@+id/textView21" android:src="@drawable/ic_share" /> + + diff --git a/app/src/main/res/layout/activity_display_currency.xml b/app/src/main/res/layout/activity_display_currency.xml index 08f44209e..dc8a9a2f3 100644 --- a/app/src/main/res/layout/activity_display_currency.xml +++ b/app/src/main/res/layout/activity_display_currency.xml @@ -122,13 +122,14 @@ app:layout_constraintVertical_bias="0.0" /> diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 62721bff0..cf3b35dc6 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -34,4 +34,15 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintHorizontal_bias="0.0" /> + + diff --git a/app/src/main/res/layout/activity_spend_limit.xml b/app/src/main/res/layout/activity_spend_limit.xml index 70728e6f3..432ff78b5 100644 --- a/app/src/main/res/layout/activity_spend_limit.xml +++ b/app/src/main/res/layout/activity_spend_limit.xml @@ -59,4 +59,15 @@ app:layout_constraintTop_toTopOf="@+id/title" android:visibility="invisible" /> + +