From 32b66c655bcc237ce26e7c54a94a672c2b095f9f Mon Sep 17 00:00:00 2001 From: m2049r Date: Sun, 17 Jun 2018 13:21:59 +0200 Subject: [PATCH] Layout tweaks (#319) * sweep layout tweak * reduce label to fit * change sweep message --- .../send/SendAmountWizardFragment.java | 14 +++++----- .../main/res/layout/fragment_send_amount.xml | 26 ++++++++++++++++--- app/src/main/res/values-de/strings.xml | 3 ++- app/src/main/res/values-es/strings.xml | 1 + app/src/main/res/values-fr/strings.xml | 1 + app/src/main/res/values-it/strings.xml | 1 + app/src/main/res/values-nb/strings.xml | 1 + app/src/main/res/values-zh-rCN/strings.xml | 1 + app/src/main/res/values-zh-rTW/strings.xml | 1 + app/src/main/res/values/strings.xml | 2 ++ 10 files changed, 38 insertions(+), 13 deletions(-) diff --git a/app/src/main/java/com/m2049r/xmrwallet/fragment/send/SendAmountWizardFragment.java b/app/src/main/java/com/m2049r/xmrwallet/fragment/send/SendAmountWizardFragment.java index 7d36601cdb..6a57c9f990 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/fragment/send/SendAmountWizardFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/fragment/send/SendAmountWizardFragment.java @@ -60,9 +60,8 @@ interface Listener { private TextView tvFunds; private ExchangeTextView evAmount; - private NumberPadView numberPad; private View llAmount; - private View ivSweep; + private View rlSweep; private ImageButton ibSweep; @Override @@ -78,12 +77,11 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, tvFunds = (TextView) view.findViewById(R.id.tvFunds); evAmount = (ExchangeTextView) view.findViewById(R.id.evAmount); - numberPad = (NumberPadView) view.findViewById(R.id.numberPad); - numberPad.setListener(evAmount); + ((NumberPadView) view.findViewById(R.id.numberPad)).setListener(evAmount); + rlSweep = view.findViewById(R.id.rlSweep); llAmount = view.findViewById(R.id.llAmount); - ivSweep = view.findViewById(R.id.ivSweep); - ivSweep.setOnClickListener(new View.OnClickListener() { + view.findViewById(R.id.ivSweep).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { sweepAll(false); @@ -110,11 +108,11 @@ private void sweepAll(boolean spendAllMode) { if (spendAllMode) { ibSweep.setVisibility(View.INVISIBLE); llAmount.setVisibility(View.GONE); - ivSweep.setVisibility(View.VISIBLE); + rlSweep.setVisibility(View.VISIBLE); } else { ibSweep.setVisibility(View.VISIBLE); llAmount.setVisibility(View.VISIBLE); - ivSweep.setVisibility(View.GONE); + rlSweep.setVisibility(View.GONE); } this.spendAllMode = spendAllMode; } diff --git a/app/src/main/res/layout/fragment_send_amount.xml b/app/src/main/res/layout/fragment_send_amount.xml index f2d3a3f037..f6cdfcaacc 100644 --- a/app/src/main/res/layout/fragment_send_amount.xml +++ b/app/src/main/res/layout/fragment_send_amount.xml @@ -57,11 +57,29 @@ - + android:visibility="gone"> + + + + diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 3c8355aa08..eb90ade69a 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -183,7 +183,7 @@ Adresse Betrag Optionen - Annehmen + Gebühr Fertig Betrag @@ -259,4 +259,5 @@ %1$s XMR Added new account #%1$d Account # + Send all confirmed funds in this account! diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 04e00991fb..457fdfd966 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -258,4 +258,5 @@ %1$s XMR Added new account #%1$d Account # + Send all confirmed funds in this account! diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index ac95b79f88..1049775cd5 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -261,4 +261,5 @@ %1$s XMR Nouveau Compte #%1$d ajouté Compte # + Send all confirmed funds in this account! diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index f7e3244be6..581ba16854 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -260,4 +260,5 @@ %1$s XMR Added new account #%1$d Account # + Send all confirmed funds in this account! diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml index a571133297..69e0f1c9b0 100644 --- a/app/src/main/res/values-nb/strings.xml +++ b/app/src/main/res/values-nb/strings.xml @@ -259,4 +259,5 @@ %1$s XMR Added new account #%1$d Account # + Send all confirmed funds in this account! diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 9d004dab95..f27d7e61e1 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -256,4 +256,5 @@ %1$s XMR Added new account #%1$d Account # + Send all confirmed funds in this account! diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index daa52895df..1bbde725ee 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -257,4 +257,5 @@ %1$s XMR Added new account #%1$d Account # + Send all confirmed funds in this account! diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 99aca31d03..b75186b3fb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -200,6 +200,8 @@ Create Transaction Error + Send all confirmed funds in this account! + %1$s XMR Added new account #%1$d