diff --git a/README.md b/README.md index 09ce63d..9ec4776 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,4 @@ See [the instructions](doc/BUILDING-external-libs.md) Then, fire up Android Studio and build the APK. ### Donations -- Address: 87MRtZPrWUCVUgcFHdsVb5MoZUcLtqfD3FvQVGwftFb8eSdMnE39JhAJcbuSW8X2vRaRsB9RQfuCpFciybJFHaz3QYPhCLw +- Address: 87BqQYkugEzh6Tuyotm2uc3DzJzKM6MuZaC161e6u1TsQxxPmXVPHpdNRyK47JY4d1hhbe25YVz4e9vTXCLDxvHkRXEAeBC diff --git a/app/build.gradle b/app/build.gradle index fddedb7..e446c9a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -9,8 +9,8 @@ android { applicationId "net.mynero.wallet" minSdkVersion 21 targetSdkVersion 34 - versionCode 40407 - versionName "0.4.4.7 'Fluorine Fermi'" + versionCode 40500 + versionName "0.4.5 'Fluorine Fermi'" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { diff --git a/app/src/main/java/net/mynero/wallet/fragment/home/HomeFragment.java b/app/src/main/java/net/mynero/wallet/fragment/home/HomeFragment.java index 71afd2a..50606f7 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/home/HomeFragment.java +++ b/app/src/main/java/net/mynero/wallet/fragment/home/HomeFragment.java @@ -105,6 +105,7 @@ public class HomeFragment extends Fragment implements TransactionInfoAdapter.TxI } ProgressBar progressBar = view.findViewById(R.id.sync_progress_bar); + TextView progressBarText = view.findViewById(R.id.sync_progress_text); if (blockchainService != null) { blockchainService.height.observe(getViewLifecycleOwner(), height -> { Wallet wallet = WalletManager.getInstance().getWallet(); @@ -118,9 +119,14 @@ public class HomeFragment extends Fragment implements TransactionInfoAdapter.TxI progressBar.setIndeterminate(height <= 1 || daemonHeight <= 0); if (height > 1 && daemonHeight > 1) { progressBar.setProgress(x); + progressBarText.setVisibility(View.VISIBLE); + progressBarText.setText("Syncing... " + height + " / " + daemonHeight); + } else { + progressBarText.setVisibility(View.GONE); } } else { progressBar.setVisibility(View.INVISIBLE); + progressBarText.setVisibility(View.GONE); } }); } diff --git a/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingFragment.java b/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingFragment.java index 8c4c79e..66e9878 100644 --- a/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingFragment.java +++ b/app/src/main/java/net/mynero/wallet/fragment/onboarding/OnboardingFragment.java @@ -92,6 +92,8 @@ public class OnboardingFragment extends Fragment implements NodeSelectionBottomS private ImageView moreOptionsChevronImageView; private CheckBox seedOffsetCheckbox; private Button selectNodeButton; + private SwitchCompat showXmrchanSwitch; + private ImageView xmrchanOnboardingImage; @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @@ -118,6 +120,8 @@ public class OnboardingFragment extends Fragment implements NodeSelectionBottomS walletProxyPortEditText = view.findViewById(R.id.wallet_proxy_port_edittext); seedOffsetCheckbox.setChecked(useOffset); advancedOptionsLayout = view.findViewById(R.id.more_options_layout); + showXmrchanSwitch = view.findViewById(R.id.show_xmrchan_switch); + xmrchanOnboardingImage = view.findViewById(R.id.xmrchan_onboarding_imageview); bindListeners(); bindObservers(); @@ -223,6 +227,16 @@ public class OnboardingFragment extends Fragment implements NodeSelectionBottomS mViewModel.updateProxy(((MoneroApplication)getActivity().getApplication())); }); + showXmrchanSwitch.setChecked(PrefService.getInstance().getBoolean(Constants.PREF_MONEROCHAN, true)); + showXmrchanSwitch.setOnCheckedChangeListener((compoundButton, b) -> { + PrefService.getInstance().edit().putBoolean(Constants.PREF_MONEROCHAN, b).apply(); + if(b) { + xmrchanOnboardingImage.setVisibility(View.VISIBLE); + } else { + xmrchanOnboardingImage.setVisibility(View.GONE); + } + }); + Node node = PrefService.getInstance().getNode(); // should be using default here selectNodeButton.setText(getString(R.string.node_button_text, node.getAddress())); selectNodeButton.setOnClickListener(view1 -> { diff --git a/app/src/main/res/drawable/sync_progress_bar_drawable.xml b/app/src/main/res/drawable/sync_progress_bar_drawable.xml index 25b5e7f..dd2e118 100644 --- a/app/src/main/res/drawable/sync_progress_bar_drawable.xml +++ b/app/src/main/res/drawable/sync_progress_bar_drawable.xml @@ -2,7 +2,7 @@ - + diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index fd99178..a6b5065 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -10,7 +10,7 @@ android:id="@+id/sync_progress_bar" style="?android:attr/progressBarStyleHorizontal" android:layout_width="0dp" - android:layout_height="4dp" + android:layout_height="16dp" android:indeterminate="true" android:indeterminateTint="@color/oled_colorSecondary" android:progressDrawable="@drawable/sync_progress_bar_drawable" @@ -18,6 +18,22 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> + + + + + +