Added multi-language switch

This commit is contained in:
2022-07-05 22:55:32 +08:00
parent e163c958d4
commit 32295e4a2b
22 changed files with 394 additions and 85 deletions

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.setting.SettingFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
</LinearLayout>
</ScrollView>

View File

@@ -1,22 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="15dp"
tools:context=".ui.theme.ThemeFragment">
<TextView
android:id="@+id/text_theme"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:textAlignment="center"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/setting_dark_mode"
android:textColor="?attr/app_text_theme"
android:textSize="@dimen/default_text_size" />
<androidx.appcompat.widget.AppCompatSpinner
android:id="@+id/theme_dark_mode_spinner"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:entries="@array/setting_dark_theme_selects_array"
android:spinnerMode="dropdown"
android:theme="@style/ThemeSpinner" />
</LinearLayout>
</LinearLayout>
</ScrollView>