Files
AndroidJava/dash-wallet/wallet/res/layout/fragment_transaction_metadata_settings.xml
coco 7846a45f2c a
2026-07-03 15:47:27 +08:00

246 lines
11 KiB
XML

<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright 2023 Dash Core Group.
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_marginHorizontal="20dp"
android:background="@color/background_primary"
tools:context="de.schildbach.wallet.ui.username.UsernameRequestsFragment">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:contentInsetEnd="10dp"
app:layout_collapseMode="pin"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navigationIcon="@drawable/ic_chevron"
app:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<LinearLayout
android:id="@+id/quick_vote_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:orientation="horizontal"
android:paddingHorizontal="12dp"
android:paddingVertical="4dp">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:src="@drawable/ic_info" />
</LinearLayout>
</androidx.appcompat.widget.Toolbar>
<TextView
android:id="@+id/title"
style="@style/Headline5"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@string/transaction_metadata_title"
app:layout_constraintTop_toBottomOf="@id/toolbar" />
<TextView
android:id="@+id/description"
style="@style/Body2.Medium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@string/transaction_metadata_description"
app:layout_constraintTop_toBottomOf="@id/title" />
<RelativeLayout
android:id="@+id/save_data_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="26dp"
app:layout_constraintTop_toBottomOf="@id/description">
<TextView
style="@style/Body2.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:text="Save data on network" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/save_data_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:theme="@style/SwitchCompat" />
</RelativeLayout>
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
app:layout_constraintTop_toBottomOf="@+id/save_data_container">
<LinearLayout
android:id="@+id/settings_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
style="@style/Caption.Medium.Secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginHorizontal="16dp"
android:text="How often to save?" />
<androidx.cardview.widget.CardView
android:id="@+id/sort_by_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
app:cardBackgroundColor="@color/background_secondary"
app:cardCornerRadius="10dp"
app:cardElevation="0dp">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/sort_by_filter"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:nestedScrollingEnabled="false"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="2"
tools:listitem="@layout/radiobutton_row" />
</androidx.cardview.widget.CardView>
<TextView
style="@style/Caption.Medium.Secondary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="20dp"
android:text="What should be saved?" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="14dp"
android:background="@drawable/white_background_rounded"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/payment_categories_container"
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_marginHorizontal="16dp"
app:layout_constraintTop_toBottomOf="@id/description">
<TextView
style="@style/Body2.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:text="Payment categories" />
<CheckBox
android:id="@+id/payment_categories_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/tax_categories_container"
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_marginHorizontal="16dp"
app:layout_constraintTop_toBottomOf="@id/description">
<TextView
style="@style/Body2.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:text="Tax categories" />
<CheckBox
android:id="@+id/tax_categories_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/fiat_prices_container"
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_marginHorizontal="16dp"
app:layout_constraintTop_toBottomOf="@id/description">
<TextView
style="@style/Body2.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:text="Fiat prices" />
<CheckBox
android:id="@+id/fiat_prices_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true" />
</RelativeLayout>
<RelativeLayout
android:id="@+id/private_memos_container"
android:layout_width="match_parent"
android:layout_height="46dp"
android:layout_marginHorizontal="16dp"
app:layout_constraintTop_toBottomOf="@id/description">
<TextView
style="@style/Body2.Medium"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
android:text="Private memos" />
<CheckBox
android:id="@+id/private_memos_check"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>