Update wallet generation error UI
This commit is contained in:
@@ -1827,6 +1827,7 @@ public class BraveRewardsPanel
|
||||
String title = mActivity.getString(R.string.something_went_wrong_text);
|
||||
String text = mActivity.getString(R.string.declare_geo_failed_response_text);
|
||||
String actionText = mActivity.getString(R.string.retry_text);
|
||||
Log.e("wallet_error", "BraveRewardsPanel : errorMessage : "+errorMessage);
|
||||
if (errorMessage.equals(WALLET_GENERATION_DISABLED_ERROR)) {
|
||||
title = mActivity.getString(R.string.wallet_generation_disabled_error_title);
|
||||
text = String.format(
|
||||
|
||||
@@ -27,6 +27,7 @@ import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.res.ResourcesCompat;
|
||||
|
||||
import org.chromium.base.BuildInfo;
|
||||
import org.chromium.base.Log;
|
||||
import org.chromium.chrome.R;
|
||||
import org.chromium.chrome.browser.BraveRewardsHelper;
|
||||
import org.chromium.chrome.browser.BraveRewardsNativeWorker;
|
||||
@@ -260,9 +261,11 @@ public class RewardsOnboarding implements BraveRewardsObserver {
|
||||
TextView responseModalText =
|
||||
mPopupView.findViewById(R.id.rewards_onboarding_error_description);
|
||||
TextView responseRewardsBtn = mPopupView.findViewById(R.id.response_action_btn);
|
||||
TextView responseModalTitle = mPopupView.findViewById(R.id.rewards_onboarding_error_title);
|
||||
TextView responseErrorText = mPopupView.findViewById(R.id.response_error_text);
|
||||
|
||||
String actionText = mPopupView.getContext().getString(R.string.retry_text);
|
||||
Log.e("wallet_error", "RewardsOnboarding : errorMessage : "+errorMessage);
|
||||
if (errorMessage.equals(BraveRewardsPanel.WALLET_GENERATION_DISABLED_ERROR)) {
|
||||
String title = mPopupView.getContext().getString(
|
||||
R.string.wallet_generation_disabled_error_title);
|
||||
@@ -273,9 +276,9 @@ public class RewardsOnboarding implements BraveRewardsObserver {
|
||||
learnMoreSpannableString(mPopupView.getContext(), text);
|
||||
responseModalText.setMovementMethod(LinkMovementMethod.getInstance());
|
||||
responseModalText.setText(spannableWithLearnMore);
|
||||
responseModalTitle.setText(title);
|
||||
actionText = mPopupView.getContext().getString(R.string.close_text);
|
||||
}
|
||||
|
||||
responseRewardsBtn.setText(actionText);
|
||||
responseErrorText.setText(errorMessage);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<TextView
|
||||
android:id="@+id/rewards_onboarding_error_description"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="46dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="32dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="sans-serif"
|
||||
|
||||
Reference in New Issue
Block a user