Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout tweaks #319

Merged
merged 3 commits into from
Jun 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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