mirror of
https://github.com/m2049r/xmrwallet
synced 2024-11-28 17:43:22 +01:00
hide receive button before wallet is loaded (#115)
This commit is contained in:
parent
2cb87bab8e
commit
cfb3c23003
@ -8,8 +8,8 @@ android {
|
||||
applicationId "com.m2049r.xmrwallet"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 25
|
||||
versionCode 38
|
||||
versionName "1.1.7"
|
||||
versionCode 39
|
||||
versionName "1.2"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
|
@ -447,6 +447,16 @@ public class WalletActivity extends AppCompatActivity implements WalletFragment.
|
||||
} else {
|
||||
haveWallet = true;
|
||||
invalidateOptionsMenu();
|
||||
|
||||
final WalletFragment walletFragment = (WalletFragment)
|
||||
getSupportFragmentManager().findFragmentById(R.id.fragment_container);
|
||||
runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
if (walletFragment != null) {
|
||||
walletFragment.onLoaded();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,6 +244,20 @@ public class WalletFragment extends Fragment
|
||||
}
|
||||
}
|
||||
|
||||
boolean walletLoaded = false;
|
||||
|
||||
public void onLoaded() {
|
||||
walletLoaded = true;
|
||||
showReceive();
|
||||
}
|
||||
|
||||
private void showReceive() {
|
||||
if (walletLoaded) {
|
||||
bReceive.setVisibility(View.VISIBLE);
|
||||
bReceive.setEnabled(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void setProgressText(final String text) {
|
||||
tvProgress.setText(text);
|
||||
}
|
||||
@ -373,5 +387,6 @@ public class WalletFragment extends Fragment
|
||||
Log.d(TAG, "onResume()");
|
||||
activityCallback.setTitle(walletTitle, walletSubtitle);
|
||||
activityCallback.setToolbarButton(Toolbar.BUTTON_CLOSE);
|
||||
showReceive();
|
||||
}
|
||||
}
|
||||
|
@ -137,11 +137,11 @@
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableStart="@drawable/ic_hand"
|
||||
android:enabled="true"
|
||||
android:enabled="false"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/label_wallet_receive"
|
||||
android:visibility="visible" />
|
||||
android:visibility="invisible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/bSend"
|
||||
@ -151,7 +151,7 @@
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:drawableStart="@drawable/ic_send"
|
||||
android:enabled="true"
|
||||
android:enabled="false"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:text="@string/label_wallet_send"
|
||||
|
Loading…
Reference in New Issue
Block a user