add light and dark theme

* currently the theme can not be changed
This commit is contained in:
2020-11-22 14:24:02 +01:00
parent 57897077ab
commit 71079ddc92
15 changed files with 63 additions and 30 deletions

View File

@ -9,9 +9,8 @@
android:id="@+id/nav_view"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="0dp"
android:layout_marginEnd="0dp"
android:background="?android:attr/windowBackground"
android:background="?themeSecondary"
app:itemIconTint="@color/bottom_nav_item_tint"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"

View File

@ -5,7 +5,7 @@
android:id="@+id/ff_test"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f5f5f5"
android:background="?themePrimary"
tools:context=".ui.fragments.HomeFragment">
<ScrollView

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f5f5f5"
android:background="?themePrimary"
tools:context=".ui.fragments.LibraryFragment">
<androidx.recyclerview.widget.RecyclerView

View File

@ -3,7 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f5f5f5"
android:background="?themePrimary"
android:clickable="true"
android:focusable="true">

View File

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f5f5f5"
android:background="?themePrimary"
tools:context=".ui.fragments.MediaFragment">
<androidx.core.widget.NestedScrollView
@ -60,7 +60,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="7dp"
android:background="@drawable/shape_rounden_corner"
android:background="@drawable/shape_rounded_corner"
android:paddingStart="3dp"
android:paddingTop="2dp"
android:paddingEnd="3dp"
@ -86,11 +86,12 @@
android:gravity="center"
android:text="@string/button_play"
android:textAllCaps="false"
android:textColor="@android:color/primary_text_dark"
android:textColor="?themePrimary"
android:textSize="16sp"
app:backgroundTint="#4A4141"
app:backgroundTint="?buttonBackground"
app:icon="@drawable/ic_baseline_play_arrow_24"
app:iconGravity="textStart" />
app:iconGravity="textStart"
app:iconTint="?themePrimary" />
<TextView
android:id="@+id/text_title"
@ -134,13 +135,14 @@
android:layout_width="48dp"
android:layout_height="48dp"
android:src="@drawable/ic_baseline_add_24"
app:tint="#4A4141" />
app:tint="?buttonBackground" />
<TextView
android:id="@+id/text_my_list_action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/my_list"
android:textColor="?textSecondary"
android:textSize="12sp" />
</LinearLayout>
</LinearLayout>

View File

@ -4,14 +4,14 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f5f5f5"
android:background="?themePrimary"
tools:context=".ui.fragments.SearchFragment">
<SearchView
android:id="@+id/search_text"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="#FFFFFF"
android:background="?themeSecondary"
android:elevation="8dp"
android:iconifiedByDefault="false"
android:paddingBottom="5dp"
@ -27,13 +27,13 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:clipToPadding="false"
android:padding="3dp"
android:orientation="vertical"
android:padding="3dp"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/search_text"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:spanCount="2"
tools:listitem="@layout/item_media">

View File

@ -44,6 +44,7 @@
android:layout_marginStart="7dp"
android:layout_weight="1"
android:text="@string/component_episode_title"
android:textColor="?textPrimary"
android:textSize="16sp" />
<ImageView
@ -52,7 +53,8 @@
android:layout_height="30dp"
android:layout_margin="2dp"
android:contentDescription="@string/component_watched_desc"
app:srcCompat="@drawable/ic_baseline_check_circle_24" />
app:srcCompat="@drawable/ic_baseline_check_circle_24"
app:tint="?iconNoAction" />
</LinearLayout>
<TextView
@ -60,5 +62,6 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2" />
android:maxLines="2"
android:textColor="?textSecondary" />
</LinearLayout>

View File

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="195dp"
android:layout_height="wrap_content"
android:backgroundTint="#FFFFFF"
android:backgroundTint="?themeSecondary"
android:visibility="visible"
app:cardCornerRadius="7dp"
app:cardElevation="4dp">