Add clickable backup and settings
This commit is contained in:
+1
-1
@@ -385,7 +385,7 @@ public class BraveWalletActivity
|
||||
verifyRecoveryPhraseFragment));
|
||||
}
|
||||
|
||||
private void backupBannerOnClick() {
|
||||
public void backupBannerOnClick() {
|
||||
cryptoOnboardingLayout.setVisibility(View.VISIBLE);
|
||||
cryptoLayout.setVisibility(View.GONE);
|
||||
|
||||
|
||||
+14
@@ -15,6 +15,7 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.AppCompatImageView;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -30,6 +31,9 @@ import org.chromium.chrome.browser.crypto_wallet.adapters.WalletCoinAdapter;
|
||||
import org.chromium.chrome.browser.crypto_wallet.listeners.OnWalletListItemClick;
|
||||
import org.chromium.chrome.browser.crypto_wallet.model.WalletListItemModel;
|
||||
import org.chromium.chrome.browser.crypto_wallet.util.Utils;
|
||||
import org.chromium.chrome.browser.settings.BraveWalletPreferences;
|
||||
import org.chromium.chrome.browser.settings.SettingsLauncherImpl;
|
||||
import org.chromium.components.browser_ui.settings.SettingsLauncher;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -65,6 +69,16 @@ public class AccountsFragment extends Fragment implements OnWalletListItemClick
|
||||
startActivityForResult(addAccountActivityIntent, Utils.ACCOUNT_REQUEST_CODE);
|
||||
});
|
||||
|
||||
TextView backupBtn = view.findViewById(R.id.accounts_backup);
|
||||
backupBtn.setOnClickListener(
|
||||
v -> { ((BraveWalletActivity) getActivity()).backupBannerOnClick(); });
|
||||
|
||||
AppCompatImageView settingsBtn = view.findViewById(R.id.accounts_settings);
|
||||
settingsBtn.setOnClickListener(v -> {
|
||||
SettingsLauncher settingsLauncher = new SettingsLauncherImpl();
|
||||
settingsLauncher.launchSettingsActivity(getContext(), BraveWalletPreferences.class);
|
||||
});
|
||||
|
||||
setUpAccountList(view);
|
||||
setUpSecondaryAccountList(view);
|
||||
}
|
||||
|
||||
@@ -11,18 +11,35 @@
|
||||
android:layout_margin="24dp"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="gravity"
|
||||
android:text="@string/backup"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/wallet_text_color"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:drawablePadding="8dp"
|
||||
app:drawableStartCompat="@drawable/ic_safe"
|
||||
app:drawableEndCompat="@drawable/ic_wallet_settings" />
|
||||
android:orientation="horizontal"
|
||||
tools:ignore="UseCompoundDrawables">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/accounts_backup"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="gravity"
|
||||
android:text="@string/backup"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/wallet_text_color"
|
||||
android:drawablePadding="8dp"
|
||||
app:drawableStartCompat="@drawable/ic_safe" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/accounts_settings"
|
||||
android:drawablePadding="8dp"
|
||||
android:layout_weight="0"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:contentDescription="@null"
|
||||
android:src="@drawable/ic_wallet_settings"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
@@ -83,4 +100,4 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
Reference in New Issue
Block a user