chore(wallet): create network selector

This commit is contained in:
Pavneet-Sing
2022-03-02 03:11:19 +05:30
parent dcd49dbb3d
commit f53a2f008f
10 changed files with 357 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="22dp"
android:height="16dp"
android:viewportWidth="22"
android:viewportHeight="16">
<path
android:pathData="M21.434,0.4C21.0951,0.08 20.6715,0 20.2479,0C19.8243,0 19.4007,0.24 19.0618,0.56L8.4719,12.08L2.8805,6.88C2.2027,6.24 1.1013,6.24 0.5083,6.88C0.1694,7.2 0,7.6 0,8C0,8.4 0.1694,8.8 0.5083,9.12L7.3706,15.52C7.6247,15.84 8.0483,16 8.5567,16H8.6414C9.1497,16 9.5733,15.76 9.8274,15.44L21.6034,2.64C22.1965,2 22.1117,0.96 21.434,0.4Z"
android:fillColor="#495057"/>
</vector>
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2022 The Brave Authors. All rights reserved.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".browser.crypto_wallet.activities.NetworkSelectorActivity">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:layout_marginBottom="8dp"
android:background="@color/wallet_toolbar_bg_color"
android:gravity="center_vertical"
android:translationZ="10dp"/>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_network_activity"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager" />
</LinearLayout>
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2022 The Brave Authors. All rights reserved.
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this file,
You can obtain one at http://mozilla.org/MPL/2.0/.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginBottom="4dp"
android:animateLayoutChanges="true"
android:orientation="horizontal"
android:paddingHorizontal="12dp"
android:paddingTop="12dp"
android:paddingBottom="12dp"
tools:ignore="UseCompoundDrawables">
<ImageView
android:id="@+id/iv_item_network_picture"
android:layout_width="14dp"
android:layout_height="14dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="8dp"
android:contentDescription="@null"
app:srcCompat="@drawable/ic_eth_24" />
<TextView
android:id="@+id/tv_item_network_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:paddingStart="1dp"
android:paddingTop="2dp"
android:paddingEnd="8dp"
android:paddingBottom="2dp"
android:textColor="@color/wallet_text_color"
android:textSize="16sp" />
<ImageView
android:id="@+id/iv_item_network_selector_selected"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_check"
android:contentDescription="@null"
android:visibility="visible"
app:tint="@color/brave_blue_tint_color" />
</LinearLayout>