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
|
||||
public void onProgress(final int n) {
|
||||
try {
|
||||
final WalletFragment walletFragment = (WalletFragment)
|
||||
getSupportFragmentManager().findFragmentByTag(WalletFragment.class.getName());
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
walletFragment.setProgress(n);
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
try {
|
||||
WalletFragment walletFragment = (WalletFragment)
|
||||
getSupportFragmentManager().findFragmentByTag(WalletFragment.class.getName());
|
||||
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() {
|
||||
|
|
|
@ -64,6 +64,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:foreground="?android:attr/selectableItemBackground"
|
||||
android:visibility="gone"
|
||||
card_view:cardCornerRadius="2dp"
|
||||
card_view:cardElevation="8dp"
|
||||
card_view:contentPadding="8dp">
|
||||
|
@ -170,7 +171,7 @@
|
|||
<TableLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:stretchColumns="1">
|
||||
android:shrinkColumns="1">
|
||||
|
||||
<TableRow>
|
||||
|
||||
|
@ -181,32 +182,33 @@
|
|||
android:padding="8sp"
|
||||
android:text="@string/tx_notes" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<EditText
|
||||
android:id="@+id/etTxNotes"
|
||||
style="@style/MoneroEdit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="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:hint="@string/tx_notes_hint"
|
||||
android:inputType="textMultiLine"
|
||||
android:textAlignment="textStart" />
|
||||
android:inputType="textMultiLine" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bTxNotes"
|
||||
style="@style/MoneroButton.Small"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerInParent="true"
|
||||
android:enabled="true"
|
||||
android:paddingEnd="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:text="@string/tx_button_notes" />
|
||||
</LinearLayout>
|
||||
</RelativeLayout>
|
||||
|
||||
</TableRow>
|
||||
|
||||
|
|
Loading…
Reference in New Issue