aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-03-19 14:30:57 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-03-19 14:30:57 +0000
commit9e4dec362dc575e44be99e650cb4c4b1e031644c (patch)
tree7eda3af7261d0871633326b1a0b71b530224ab9f /app/src/main/res
parent012736bff62005c8c61f5844529fc5216af1e885 (diff)
downloadinfinity-for-reddit-9e4dec362dc575e44be99e650cb4c4b1e031644c.tar
infinity-for-reddit-9e4dec362dc575e44be99e650cb4c4b1e031644c.tar.gz
infinity-for-reddit-9e4dec362dc575e44be99e650cb4c4b1e031644c.tar.bz2
infinity-for-reddit-9e4dec362dc575e44be99e650cb4c4b1e031644c.tar.lz
infinity-for-reddit-9e4dec362dc575e44be99e650cb4c4b1e031644c.tar.xz
infinity-for-reddit-9e4dec362dc575e44be99e650cb4c4b1e031644c.tar.zst
infinity-for-reddit-9e4dec362dc575e44be99e650cb4c4b1e031644c.zip
Still implementing custom theme settings.
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/layout/activity_custom_theme_listing.xml41
-rw-r--r--app/src/main/res/layout/item_custom_theme.xml22
-rw-r--r--app/src/main/res/layout/item_custom_theme_color_item.xml40
-rw-r--r--app/src/main/res/layout/item_custom_theme_switch_item.xml41
-rw-r--r--app/src/main/res/layout/item_theme_color_item.xml33
-rw-r--r--app/src/main/res/layout/item_theme_switch_item.xml32
-rw-r--r--app/src/main/res/values/strings.xml4
7 files changed, 148 insertions, 65 deletions
diff --git a/app/src/main/res/layout/activity_custom_theme_listing.xml b/app/src/main/res/layout/activity_custom_theme_listing.xml
new file mode 100644
index 00000000..f128c11c
--- /dev/null
+++ b/app/src/main/res/layout/activity_custom_theme_listing.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<androidx.coordinatorlayout.widget.CoordinatorLayout 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"
+ tools:context=".Activity.CustomThemeListingActivity">
+
+ <com.google.android.material.appbar.AppBarLayout
+ android:id="@+id/appbar_layout_customize_theme_listing_activity"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:background="?attr/toolbarAndTabBackgroundColor"
+ android:theme="@style/AppTheme.AppBarOverlay">
+
+ <com.google.android.material.appbar.CollapsingToolbarLayout
+ android:id="@+id/collapsing_toolbar_layout_customize_theme_listing_activity"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_scrollFlags="scroll|enterAlways"
+ app:titleEnabled="false"
+ app:toolbarId="@+id/toolbar_customize_theme_listing_activity">
+
+ <androidx.appcompat.widget.Toolbar
+ android:id="@+id/toolbar_customize_theme_listing_activity"
+ android:layout_width="match_parent"
+ android:layout_height="?attr/actionBarSize"
+ app:popupTheme="@style/AppTheme.PopupOverlay"
+ app:navigationIcon="?attr/homeAsUpIndicator" />
+
+ </com.google.android.material.appbar.CollapsingToolbarLayout>
+
+ </com.google.android.material.appbar.AppBarLayout>
+
+ <androidx.recyclerview.widget.RecyclerView
+ android:id="@+id/recycler_view_customize_theme_listing_activity"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ app:layout_behavior="@string/appbar_scrolling_view_behavior" />
+
+</androidx.coordinatorlayout.widget.CoordinatorLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_custom_theme.xml b/app/src/main/res/layout/item_custom_theme.xml
new file mode 100644
index 00000000..1aba3472
--- /dev/null
+++ b/app/src/main/res/layout/item_custom_theme.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout
+ xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground">
+
+ <View
+ android:id="@+id/color_primary_item_custom_theme"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:background="@drawable/circular_background" />
+
+ <TextView
+ android:id="@+id/name_text_view_item_custom_theme"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginStart="32dp" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_custom_theme_color_item.xml b/app/src/main/res/layout/item_custom_theme_color_item.xml
new file mode 100644
index 00000000..9a56b98b
--- /dev/null
+++ b/app/src/main/res/layout/item_custom_theme_color_item.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground">
+
+ <View
+ android:id="@+id/color_image_view_item_custom_theme_color_item"
+ android:layout_width="24dp"
+ android:layout_height="24dp"
+ android:background="@drawable/circular_background"
+ android:layout_gravity="center_vertical" />
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_marginStart="32dp">
+
+ <TextView
+ android:id="@+id/theme_item_name_text_view_item_custom_theme_color_item"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_16" />
+
+ <TextView
+ android:id="@+id/theme_item_info_text_view_item_custom_theme_color_item"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
+ android:textColor="?attr/secondaryTextColor"
+ android:textSize="?attr/font_default" />
+
+ </LinearLayout>
+
+</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_custom_theme_switch_item.xml b/app/src/main/res/layout/item_custom_theme_switch_item.xml
new file mode 100644
index 00000000..18e3aed2
--- /dev/null
+++ b/app/src/main/res/layout/item_custom_theme_switch_item.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:padding="16dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground">
+
+ <LinearLayout
+ android:layout_width="0dp"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:layout_weight="1"
+ android:layout_marginStart="56dp"
+ android:layout_marginEnd="16dp">
+
+ <TextView
+ android:id="@+id/theme_item_name_text_view_item_custom_theme_switch_item"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="?attr/primaryTextColor"
+ android:textSize="?attr/font_16" />
+
+ <TextView
+ android:id="@+id/theme_item_info_text_view_item_custom_theme_switch_item"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="4dp"
+ android:textColor="?attr/secondaryTextColor"
+ android:textSize="?attr/font_default" />
+
+ </LinearLayout>
+
+ <Switch
+ android:id="@+id/theme_item_switch_item_custom_theme_switch_item"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_theme_color_item.xml b/app/src/main/res/layout/item_theme_color_item.xml
deleted file mode 100644
index 6adc2d29..00000000
--- a/app/src/main/res/layout/item_theme_color_item.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<?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"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
-
- <View
- android:id="@+id/color_image_view_item_theme_color_item"
- android:layout_width="24dp"
- android:layout_height="24dp"
- android:background="@drawable/circular_background"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
-
- <TextView
- android:id="@+id/theme_item_name_text_view_item_theme_color_item"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintStart_toEndOf="@id/color_image_view_item_theme_color_item"
- app:layout_constraintEnd_toEndOf="parent" />
-
- <TextView
- android:id="@+id/theme_item_info_text_view_item_theme_color_item"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:layout_constraintTop_toBottomOf="@id/theme_item_name_text_view_item_theme_color_item"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toEndOf="@id/color_image_view_item_theme_color_item"
- app:layout_constraintEnd_toEndOf="parent" />
-
-</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_theme_switch_item.xml b/app/src/main/res/layout/item_theme_switch_item.xml
deleted file mode 100644
index 4b337fc8..00000000
--- a/app/src/main/res/layout/item_theme_switch_item.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- xmlns:app="http://schemas.android.com/apk/res-auto">
-
- <TextView
- android:id="@+id/theme_item_name_text_view_item_theme_switch_item"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toEndOf="parent" />
-
- <TextView
- android:id="@+id/theme_item_info_text_view_item_theme_switch_item"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:layout_constraintTop_toBottomOf="@id/theme_item_name_text_view_item_theme_switch_item"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintEnd_toStartOf="@id/theme_item_switch_item_theme_switch_item" />
-
- <Switch
- android:id="@+id/theme_item_switch_item_theme_switch_item"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- app:layout_constraintTop_toTopOf="parent"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent" />
-
-</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 158495c7..c32eac17 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -598,4 +598,8 @@
<string name="theme_item_available_on_android_8">Only available for Android 8.0 or above.</string>
<string name="theme_item_available_on_android_6">Only available for Android 6.0 or above.</string>
+ <string name="theme_name_indigo">Indigo</string>
+ <string name="theme_name_indigo_dark">Indigo Dark</string>
+ <string name="theme_name_indigo_amoled">Indigo Amoled</string>
+
</resources>