From 0f36ad4e1db8789fb012a54b8b6f81dbca49e828 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Wed, 26 Feb 2020 22:40:15 +0800 Subject: Prepare to add different themes. Try fixing timeout issue in okhttp3. --- .../res/layout/activity_multi_reddit_listing.xml | 2 +- app/src/main/res/layout/activity_post_image.xml | 8 ++++---- app/src/main/res/layout/activity_post_link.xml | 4 ++-- app/src/main/res/layout/activity_post_text.xml | 4 ++-- app/src/main/res/layout/activity_post_video.xml | 8 ++++---- .../main/res/layout/activity_view_post_detail.xml | 2 +- .../res/layout/activity_view_subreddit_detail.xml | 2 +- .../main/res/layout/activity_view_user_detail.xml | 2 +- app/src/main/res/layout/app_bar_main.xml | 2 +- app/src/main/res/layout/item_comment.xml | 7 +++---- app/src/main/res/layout/item_footer_error.xml | 2 +- .../layout/item_load_more_comments_placeholder.xml | 3 +-- app/src/main/res/layout/item_post.xml | 22 +++++++++++----------- app/src/main/res/layout/item_post_compact.xml | 20 ++++++++++---------- app/src/main/res/layout/item_post_detail.xml | 22 +++++++++++----------- app/src/main/res/layout/item_subreddit_listing.xml | 2 +- app/src/main/res/layout/item_user_listing.xml | 2 +- 17 files changed, 56 insertions(+), 58 deletions(-) (limited to 'app/src/main/res/layout') diff --git a/app/src/main/res/layout/activity_multi_reddit_listing.xml b/app/src/main/res/layout/activity_multi_reddit_listing.xml index 1669a8c8..ef04c4e7 100644 --- a/app/src/main/res/layout/activity_multi_reddit_listing.xml +++ b/app/src/main/res/layout/activity_multi_reddit_listing.xml @@ -76,7 +76,7 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/fab_margin" android:layout_gravity="bottom|end" - app:backgroundTint="@color/backgroundColorPrimary" + app:backgroundTint="?attr/colorPrimaryLightTheme" app:srcCompat="@drawable/ic_add_bottom_app_bar_24dp" app:tint="@android:color/white" /> diff --git a/app/src/main/res/layout/activity_post_image.xml b/app/src/main/res/layout/activity_post_image.xml index 9c320679..92254896 100644 --- a/app/src/main/res/layout/activity_post_image.xml +++ b/app/src/main/res/layout/activity_post_image.xml @@ -92,7 +92,7 @@ android:textSize="?attr/font_default" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBorderColor="?attr/flairColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -106,7 +106,7 @@ android:textColor="@color/primaryTextColor" android:textSize="?attr/font_default" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -164,7 +164,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@+id/select_from_library_fab_post_image_activity" app:layout_constraintHorizontal_chainStyle="spread" - app:backgroundTint="@color/backgroundColorPrimary" + app:backgroundTint="?attr/colorPrimaryLightTheme" app:tint="@android:color/white" /> diff --git a/app/src/main/res/layout/activity_post_link.xml b/app/src/main/res/layout/activity_post_link.xml index 24ba75b6..7aed97e1 100644 --- a/app/src/main/res/layout/activity_post_link.xml +++ b/app/src/main/res/layout/activity_post_link.xml @@ -92,7 +92,7 @@ android:textSize="?attr/font_default" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBorderColor="?attr/flairColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -106,7 +106,7 @@ android:textColor="@color/primaryTextColor" android:textSize="?attr/font_default" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml index 7cabdf0b..5f6d638d 100644 --- a/app/src/main/res/layout/activity_post_text.xml +++ b/app/src/main/res/layout/activity_post_text.xml @@ -92,7 +92,7 @@ android:textSize="?attr/font_default" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBorderColor="?attr/flairColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -106,7 +106,7 @@ android:textColor="@color/primaryTextColor" android:textSize="?attr/font_default" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> diff --git a/app/src/main/res/layout/activity_post_video.xml b/app/src/main/res/layout/activity_post_video.xml index 2e3057d5..341034a7 100644 --- a/app/src/main/res/layout/activity_post_video.xml +++ b/app/src/main/res/layout/activity_post_video.xml @@ -92,7 +92,7 @@ android:textSize="?attr/font_default" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBorderColor="?attr/flairColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -106,7 +106,7 @@ android:textColor="@color/primaryTextColor" android:textSize="?attr/font_default" app:lib_setRadius="3dp" - app:lib_setRoundedBorderColor="@color/colorPrimaryDarkDayNightTheme" + app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -164,7 +164,7 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toStartOf="@+id/select_from_library_fab_post_video_activity" app:layout_constraintHorizontal_chainStyle="spread" - app:backgroundTint="@color/backgroundColorPrimary" + app:backgroundTint="?attr/colorPrimaryLightTheme" app:tint="@android:color/white" /> diff --git a/app/src/main/res/layout/activity_view_post_detail.xml b/app/src/main/res/layout/activity_view_post_detail.xml index 4ee9dff7..fb9bb240 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -76,7 +76,7 @@ android:layout_height="wrap_content" android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" - app:backgroundTint="@color/backgroundColorPrimary" + app:backgroundTint="?attr/colorPrimaryLightTheme" app:tint="@android:color/white" app:srcCompat="@drawable/ic_keyboard_arrow_down_24dp" /> diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml index 6743aef0..f36640ce 100644 --- a/app/src/main/res/layout/activity_view_subreddit_detail.xml +++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml @@ -203,7 +203,7 @@ android:layout_height="wrap_content" android:layout_margin="@dimen/fab_margin" android:visibility="gone" - app:backgroundTint="@color/backgroundColorPrimary" + app:backgroundTint="?attr/colorPrimaryLightTheme" app:srcCompat="@drawable/ic_add_bottom_app_bar_24dp" app:tint="@android:color/white" app:layout_anchor="@id/bottom_navigation_view_subreddit_detail_activity" /> diff --git a/app/src/main/res/layout/activity_view_user_detail.xml b/app/src/main/res/layout/activity_view_user_detail.xml index efeee887..f1d257e6 100644 --- a/app/src/main/res/layout/activity_view_user_detail.xml +++ b/app/src/main/res/layout/activity_view_user_detail.xml @@ -66,7 +66,7 @@ android:layout_height="wrap_content" android:layout_marginTop="16dp" android:textSize="?attr/font_18" - android:textColor="@color/colorPrimaryDarkDayNightTheme" + android:textColor="?attr/username" android:layout_gravity="center_horizontal"/> diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml index f80d6bfb..88307a62 100644 --- a/app/src/main/res/layout/item_comment.xml +++ b/app/src/main/res/layout/item_comment.xml @@ -14,8 +14,7 @@ + android:layout_height="match_parent" /> diff --git a/app/src/main/res/layout/item_load_more_comments_placeholder.xml b/app/src/main/res/layout/item_load_more_comments_placeholder.xml index 0a4a0047..8c0fb3e1 100644 --- a/app/src/main/res/layout/item_load_more_comments_placeholder.xml +++ b/app/src/main/res/layout/item_load_more_comments_placeholder.xml @@ -12,8 +12,7 @@ + android:layout_height="match_parent" /> @@ -144,8 +144,8 @@ android:padding="4dp" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBGColor="@color/spoilerBackgroundColor" - app:lib_setRoundedBorderColor="@color/spoilerBackgroundColor" + app:lib_setRoundedBGColor="?attr/spoilerColor" + app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -174,8 +174,8 @@ android:padding="4dp" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBGColor="@color/flairBackgroundColor" - app:lib_setRoundedBorderColor="@color/flairBackgroundColor" + app:lib_setRoundedBGColor="?attr/flairColor" + app:lib_setRoundedBorderColor="?attr/flairColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -194,7 +194,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/ic_archive_outline" - android:tint="@color/archivedTint" + android:tint="?attr/archivedTint" android:visibility="gone" /> diff --git a/app/src/main/res/layout/item_post_compact.xml b/app/src/main/res/layout/item_post_compact.xml index 7123c4db..ef7c2fe9 100644 --- a/app/src/main/res/layout/item_post_compact.xml +++ b/app/src/main/res/layout/item_post_compact.xml @@ -47,7 +47,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:layout_marginEnd="8dp" - android:tint="@color/backgroundColorPrimaryDark" + android:tint="?attr/stickiedPost" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@+id/guideline2" @@ -115,8 +115,8 @@ android:textColor="@android:color/white" android:textSize="?attr/font_10" app:lib_setRadius="3dp" - app:lib_setRoundedBGColor="@color/backgroundColorPrimaryDark" - app:lib_setRoundedBorderColor="@color/backgroundColorPrimaryDark" + app:lib_setRoundedBGColor="?attr/post_type" + app:lib_setRoundedBorderColor="?attr/post_type" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -131,8 +131,8 @@ android:textSize="?attr/font_10" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBGColor="@color/spoilerBackgroundColor" - app:lib_setRoundedBorderColor="@color/spoilerBackgroundColor" + app:lib_setRoundedBGColor="?attr/spoilerColor" + app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -161,8 +161,8 @@ android:textSize="?attr/font_10" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBGColor="@color/flairBackgroundColor" - app:lib_setRoundedBorderColor="@color/flairBackgroundColor" + app:lib_setRoundedBGColor="?attr/flairColor" + app:lib_setRoundedBorderColor="?attr/flairColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -181,7 +181,7 @@ android:layout_width="24dp" android:layout_height="24dp" android:src="@drawable/ic_archive_outline" - android:tint="@color/archivedTint" + android:tint="?attr/archivedTint" android:visibility="gone" /> diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml index 54d48283..e0bcc418 100644 --- a/app/src/main/res/layout/item_post_detail.xml +++ b/app/src/main/res/layout/item_post_detail.xml @@ -26,7 +26,7 @@ android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginEnd="8dp" - android:textColor="@color/colorAccent" + android:textColor="?attr/subreddit" android:textSize="?attr/font_default" android:maxLines="2" android:ellipsize="end" @@ -41,7 +41,7 @@ android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginEnd="8dp" - android:textColor="@color/colorPrimaryDarkDayNightTheme" + android:textColor="?attr/username" android:textSize="?attr/font_default" android:maxLines="2" android:ellipsize="end" @@ -109,8 +109,8 @@ android:padding="4dp" android:textSize="?attr/font_12" android:textColor="@android:color/white" - app:lib_setRoundedBGColor="@color/backgroundColorPrimaryDark" - app:lib_setRoundedBorderColor="@color/backgroundColorPrimaryDark" + app:lib_setRoundedBGColor="?attr/post_type" + app:lib_setRoundedBorderColor="?attr/post_type" app:lib_setRadius="3dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -126,8 +126,8 @@ android:padding="4dp" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBGColor="@color/spoilerBackgroundColor" - app:lib_setRoundedBorderColor="@color/spoilerBackgroundColor" + app:lib_setRoundedBGColor="?attr/spoilerColor" + app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -156,8 +156,8 @@ android:textColor="@android:color/white" android:visibility="gone" app:lib_setRadius="3dp" - app:lib_setRoundedBGColor="@color/flairBackgroundColor" - app:lib_setRoundedBorderColor="@color/flairBackgroundColor" + app:lib_setRoundedBGColor="?attr/flairColor" + app:lib_setRoundedBorderColor="?attr/flairColor" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -176,7 +176,7 @@ android:layout_width="20dp" android:layout_height="20dp" android:src="@drawable/ic_archive_outline" - android:tint="@color/archivedTint" + android:tint="?attr/archivedTint" android:visibility="gone" /> diff --git a/app/src/main/res/layout/item_subreddit_listing.xml b/app/src/main/res/layout/item_subreddit_listing.xml index 68157c95..f9797e7e 100644 --- a/app/src/main/res/layout/item_subreddit_listing.xml +++ b/app/src/main/res/layout/item_subreddit_listing.xml @@ -36,7 +36,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:src="@drawable/ic_add_24dp" - android:tint="@color/colorPrimaryDarkDayNightTheme" + android:tint="?attr/unsubscribed" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" diff --git a/app/src/main/res/layout/item_user_listing.xml b/app/src/main/res/layout/item_user_listing.xml index a69b6a37..9ba6d291 100644 --- a/app/src/main/res/layout/item_user_listing.xml +++ b/app/src/main/res/layout/item_user_listing.xml @@ -36,7 +36,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:src="@drawable/ic_add_24dp" - android:tint="@color/colorPrimaryDarkDayNightTheme" + android:tint="?attr/unsubscribed" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toBottomOf="parent" -- cgit v1.2.3