Skip to content

Commit

Permalink
Layout tweaks (#319)
Browse files Browse the repository at this point in the history
* sweep layout tweak

* reduce label to fit

* change sweep message
  • Loading branch information
m2049r authored Jun 17, 2018
1 parent 9d41d5d commit 817816c
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand All @@ -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;
}
Expand Down
26 changes: 22 additions & 4 deletions app/src/main/res/layout/fragment_send_amount.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,29 @@

</LinearLayout>

<ImageView
android:id="@+id/ivSweep"
<RelativeLayout
android:id="@+id/rlSweep"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:src="@drawable/ic_all_inclusive_24dp"
android:visibility="gone"/>
android:visibility="gone">

<ImageView
android:id="@+id/ivSweep"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/tvSweep"
android:layout_alignParentTop="true"
android:padding="16dp"
android:src="@drawable/ic_all_inclusive_24dp" />

<TextView
android:id="@+id/tvSweep"
style="@style/MoneroLabel.Heading.Donation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="16dp"
android:gravity="center"
android:text="@string/send_sweepall" />
</RelativeLayout>
</LinearLayout>
3 changes: 2 additions & 1 deletion app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
<string name="send_address_title">Adresse</string>
<string name="send_amount_title">Betrag</string>
<string name="send_settings_title">Optionen</string>
<string name="send_confirm_title">Annehmen</string>
<string name="send_confirm_title">Gebühr</string>
<string name="send_success_title">Fertig</string>

<string name="send_amount_label">Betrag</string>
Expand Down Expand Up @@ -317,4 +317,5 @@
<string name="accounts_balance">%1$s XMR</string>
<string name="accounts_new">Added new account #%1$d</string>
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,5 @@
<string name="accounts_balance">%1$s XMR</string>
<string name="accounts_new">Added new account #%1$d</string>
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,5 @@
<string name="accounts_balance">%1$s XMR</string>
<string name="accounts_new">Nouveau Compte #%1$d ajouté</string>
<string name="tx_account">Compte #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -318,4 +318,5 @@
<string name="accounts_balance">%1$s XMR</string>
<string name="accounts_new">Added new account #%1$d</string>
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -316,4 +316,5 @@
<string name="accounts_balance">%1$s XMR</string>
<string name="accounts_new">Added new account #%1$d</string>
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,4 +314,5 @@
<string name="accounts_balance">%1$s XMR</string>
<string name="accounts_new">Added new account #%1$d</string>
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
</resources>
1 change: 1 addition & 0 deletions app/src/main/res/values-zh-rTW/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,5 @@
<string name="accounts_balance">%1$s XMR</string>
<string name="accounts_new">Added new account #%1$d</string>
<string name="tx_account">Account #</string>
<string name="send_sweepall">Send all confirmed funds in this account!</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@

<string name="send_create_tx_error_title">Create Transaction Error</string>

<string name="send_sweepall">Send all confirmed funds in this account!</string>

<string name="accounts_balance">%1$s XMR</string>
<string name="accounts_new">Added new account #%1$d</string>

Expand Down

0 comments on commit 817816c

Please sign in to comment.