UI tweaks, fix crash (#164)
This commit is contained in:
parent
1082175089
commit
ea1e8ac2c3
|
@ -560,19 +560,20 @@ public class WalletActivity extends SecureActivity implements WalletFragment.Lis
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onProgress(final int n) {
|
public void onProgress(final int n) {
|
||||||
try {
|
runOnUiThread(new Runnable() {
|
||||||
final WalletFragment walletFragment = (WalletFragment)
|
public void run() {
|
||||||
getSupportFragmentManager().findFragmentByTag(WalletFragment.class.getName());
|
try {
|
||||||
runOnUiThread(new Runnable() {
|
WalletFragment walletFragment = (WalletFragment)
|
||||||
public void run() {
|
getSupportFragmentManager().findFragmentByTag(WalletFragment.class.getName());
|
||||||
walletFragment.setProgress(n);
|
if (walletFragment != null)
|
||||||
|
walletFragment.setProgress(n);
|
||||||
|
} catch (ClassCastException ex) {
|
||||||
|
// not in wallet fragment (probably send monero)
|
||||||
|
Timber.d(ex.getLocalizedMessage());
|
||||||
|
// keep calm and carry on
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
} catch (ClassCastException ex) {
|
});
|
||||||
// not in wallet fragment (probably send monero)
|
|
||||||
Timber.d(ex.getLocalizedMessage());
|
|
||||||
// keep calm and carry on
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateProgress() {
|
private void updateProgress() {
|
||||||
|
|
|
@ -64,6 +64,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_margin="16dp"
|
android:layout_margin="16dp"
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
|
android:visibility="gone"
|
||||||
card_view:cardCornerRadius="2dp"
|
card_view:cardCornerRadius="2dp"
|
||||||
card_view:cardElevation="8dp"
|
card_view:cardElevation="8dp"
|
||||||
card_view:contentPadding="8dp">
|
card_view:contentPadding="8dp">
|
||||||
|
@ -170,7 +171,7 @@
|
||||||
<TableLayout
|
<TableLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:stretchColumns="1">
|
android:shrinkColumns="1">
|
||||||
|
|
||||||
<TableRow>
|
<TableRow>
|
||||||
|
|
||||||
|
@ -181,32 +182,33 @@
|
||||||
android:padding="8sp"
|
android:padding="8sp"
|
||||||
android:text="@string/tx_notes" />
|
android:text="@string/tx_notes" />
|
||||||
|
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content">
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/etTxNotes"
|
android:id="@+id/etTxNotes"
|
||||||
style="@style/MoneroEdit"
|
style="@style/MoneroEdit"
|
||||||
android:layout_width="0dp"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_toStartOf="@+id/bTxNotes"
|
||||||
android:backgroundTint="@color/moneroGray"
|
android:backgroundTint="@color/moneroGray"
|
||||||
android:hint="@string/tx_notes_hint"
|
android:hint="@string/tx_notes_hint"
|
||||||
android:inputType="textMultiLine"
|
android:inputType="textMultiLine" />
|
||||||
android:textAlignment="textStart" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/bTxNotes"
|
android:id="@+id/bTxNotes"
|
||||||
style="@style/MoneroButton.Small"
|
style="@style/MoneroButton.Small"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_centerInParent="true"
|
||||||
android:enabled="true"
|
android:enabled="true"
|
||||||
|
android:paddingEnd="8dp"
|
||||||
|
android:paddingStart="8dp"
|
||||||
android:text="@string/tx_button_notes" />
|
android:text="@string/tx_button_notes" />
|
||||||
</LinearLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
</TableRow>
|
</TableRow>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue