diff options
Diffstat (limited to 'app/src/main/res')
42 files changed, 142 insertions, 32 deletions
diff --git a/app/src/main/res/layout/activity_account_posts.xml b/app/src/main/res/layout/activity_account_posts.xml index cabb67f2..f05b8587 100644 --- a/app/src/main/res/layout/activity_account_posts.xml +++ b/app/src/main/res/layout/activity_account_posts.xml @@ -4,12 +4,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:context=".Activity.AccountPostsActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_account_posts_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 diff --git a/app/src/main/res/layout/activity_account_saved_thing.xml b/app/src/main/res/layout/activity_account_saved_thing.xml index 34ffa2bb..2c7e36ea 100644 --- a/app/src/main/res/layout/activity_account_saved_thing.xml +++ b/app/src/main/res/layout/activity_account_saved_thing.xml @@ -4,12 +4,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:context=".Activity.AccountPostsActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_account_saved_thing_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 @@ -35,7 +37,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:background="@color/greyTabBackgroundColor" + android:background="?attr/toolbarAndTabBackgroundColor" app:layout_scrollFlags="scroll|enterAlways" app:tabGravity="fill" app:tabIndicatorColor="@android:color/white" diff --git a/app/src/main/res/layout/activity_comment.xml b/app/src/main/res/layout/activity_comment.xml index 2a3629d7..7ea850f6 100644 --- a/app/src/main/res/layout/activity_comment.xml +++ b/app/src/main/res/layout/activity_comment.xml @@ -5,11 +5,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_comment_activity" + android:background="?attr/backgroundColor" tools:application=".CommentActivity"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/activity_edit_comment.xml b/app/src/main/res/layout/activity_edit_comment.xml index 1ba724b5..37fa4462 100644 --- a/app/src/main/res/layout/activity_edit_comment.xml +++ b/app/src/main/res/layout/activity_edit_comment.xml @@ -5,11 +5,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_edit_comment_activity" + android:background="?attr/backgroundColor" tools:context=".Activity.EditCommentActivity"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/activity_edit_post.xml b/app/src/main/res/layout/activity_edit_post.xml index 7fa93195..839e90c7 100644 --- a/app/src/main/res/layout/activity_edit_post.xml +++ b/app/src/main/res/layout/activity_edit_post.xml @@ -5,11 +5,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_edit_post_activity" + android:background="?attr/backgroundColor" tools:context=".Activity.EditPostActivity"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/activity_filtered_thing.xml b/app/src/main/res/layout/activity_filtered_thing.xml index 9d0cf259..c86116f5 100644 --- a/app/src/main/res/layout/activity_filtered_thing.xml +++ b/app/src/main/res/layout/activity_filtered_thing.xml @@ -4,12 +4,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:application=".FilteredPostsActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_filtered_posts_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 diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index 67f8eb75..904d3ab2 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -4,11 +4,13 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:application="ml.docilealligator.infinityforreddit.Activity.LoginActivity"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 50207592..d21377d3 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -5,6 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" + android:background="?attr/backgroundColor" tools:openDrawer="start"> <include @@ -16,7 +17,8 @@ android:id="@+id/nav_view" android:layout_width="wrap_content" android:layout_height="match_parent" - android:layout_gravity="start"> + android:layout_gravity="start" + android:background="?attr/backgroundColor"> <androidx.core.widget.NestedScrollView android:id="@+id/nested_scroll_view_main_activity" diff --git a/app/src/main/res/layout/activity_post_image.xml b/app/src/main/res/layout/activity_post_image.xml index 93cfcf2b..9c320679 100644 --- a/app/src/main/res/layout/activity_post_image.xml +++ b/app/src/main/res/layout/activity_post_image.xml @@ -5,11 +5,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_post_image_activity" + android:background="?attr/backgroundColor" tools:application=".PostImageActivity"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/activity_post_link.xml b/app/src/main/res/layout/activity_post_link.xml index a9e7c96d..24ba75b6 100644 --- a/app/src/main/res/layout/activity_post_link.xml +++ b/app/src/main/res/layout/activity_post_link.xml @@ -5,11 +5,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_post_link_activity" + android:background="?attr/backgroundColor" tools:application=".PostTextActivity"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml index dcb00c5c..7cabdf0b 100644 --- a/app/src/main/res/layout/activity_post_text.xml +++ b/app/src/main/res/layout/activity_post_text.xml @@ -5,11 +5,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_post_text_activity" + android:background="?attr/backgroundColor" tools:application=".PostTextActivity"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/activity_post_video.xml b/app/src/main/res/layout/activity_post_video.xml index 9510db6b..2e3057d5 100644 --- a/app/src/main/res/layout/activity_post_video.xml +++ b/app/src/main/res/layout/activity_post_video.xml @@ -5,11 +5,13 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_post_video_activity" + android:background="?attr/backgroundColor" tools:application=".PostImageActivity"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/activity_rules.xml b/app/src/main/res/layout/activity_rules.xml index 9756a716..f98d1fda 100644 --- a/app/src/main/res/layout/activity_rules.xml +++ b/app/src/main/res/layout/activity_rules.xml @@ -4,12 +4,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:application=".RulesActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_rules_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 diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml index d83a52ea..1dca2b6b 100644 --- a/app/src/main/res/layout/activity_search.xml +++ b/app/src/main/res/layout/activity_search.xml @@ -4,11 +4,13 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:application=".SearchActivity"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <FrameLayout @@ -34,7 +36,7 @@ app:hintColor="#E0E0E0" app:iconsAlpha="1" app:iconsTint="@android:color/white" - app:searchBackground="@color/colorPrimary" + app:searchBackground="?attr/colorPrimary" app:voiceSearch="true" /> </FrameLayout> diff --git a/app/src/main/res/layout/activity_search_result.xml b/app/src/main/res/layout/activity_search_result.xml index 32c4309c..4ff4fbd9 100644 --- a/app/src/main/res/layout/activity_search_result.xml +++ b/app/src/main/res/layout/activity_search_result.xml @@ -3,12 +3,14 @@ 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_height="match_parent" + android:background="?attr/backgroundColor"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_search_result_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 @@ -30,7 +32,7 @@ android:id="@+id/tab_layout_search_result_activity" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/greyTabBackgroundColor" + android:background="?attr/toolbarAndTabBackgroundColor" app:layout_scrollFlags="scroll|enterAlways" app:tabGravity="fill" app:tabMode="fixed" diff --git a/app/src/main/res/layout/activity_search_subreddits_result.xml b/app/src/main/res/layout/activity_search_subreddits_result.xml index 3652e07c..3d0467d6 100644 --- a/app/src/main/res/layout/activity_search_subreddits_result.xml +++ b/app/src/main/res/layout/activity_search_subreddits_result.xml @@ -4,12 +4,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:application=".SearchSubredditsResultActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_search_subreddits_result_activity" android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/settings_activity.xml b/app/src/main/res/layout/activity_settings.xml index 0b9ed248..be3f0f49 100644 --- a/app/src/main/res/layout/settings_activity.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -1,11 +1,13 @@ <androidx.coordinatorlayout.widget.CoordinatorLayout 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" - xmlns:app="http://schemas.android.com/apk/res-auto"> + android:background="?attr/backgroundColor"> <com.google.android.material.appbar.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" + android:background="?attr/toolbarAndTabBackgroundColor" android:theme="@style/AppTheme.AppBarOverlay"> <androidx.appcompat.widget.Toolbar diff --git a/app/src/main/res/layout/activity_subreddit_selection.xml b/app/src/main/res/layout/activity_subreddit_selection.xml index 92be6bbe..33548519 100644 --- a/app/src/main/res/layout/activity_subreddit_selection.xml +++ b/app/src/main/res/layout/activity_subreddit_selection.xml @@ -4,12 +4,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:application=".SubredditSelectionActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_subreddit_selection_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 diff --git a/app/src/main/res/layout/activity_subscribed_thing_listing.xml b/app/src/main/res/layout/activity_subscribed_thing_listing.xml index 9198a636..9cab7222 100644 --- a/app/src/main/res/layout/activity_subscribed_thing_listing.xml +++ b/app/src/main/res/layout/activity_subscribed_thing_listing.xml @@ -4,12 +4,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:application=".SubscribedThingListingActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_subscribed_thing_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 @@ -33,7 +35,7 @@ android:id="@+id/tab_layout_subscribed_thing_listing_activity" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/greyTabBackgroundColor" + android:background="?attr/toolbarAndTabBackgroundColor" app:layout_scrollFlags="scroll|enterAlways" app:tabGravity="fill" app:tabMode="fixed" diff --git a/app/src/main/res/layout/activity_view_message.xml b/app/src/main/res/layout/activity_view_message.xml index 02283e92..12e31b01 100644 --- a/app/src/main/res/layout/activity_view_message.xml +++ b/app/src/main/res/layout/activity_view_message.xml @@ -4,12 +4,14 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="?attr/backgroundColor" tools:context=".Activity.ViewMessageActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_view_message_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 @@ -45,7 +47,7 @@ android:layout_marginBottom="16dp" app:mlpb_progress_stoke_width="3dp" app:mlpb_progress_color="@color/colorAccent" - app:mlpb_background_color="@color/circularProgressBarBackground" /> + app:mlpb_background_color="?attr/circularProgressBarBackground" /> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view_view_message_activity" 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 a2e7d4c0..eb48f340 100644 --- a/app/src/main/res/layout/activity_view_post_detail.xml +++ b/app/src/main/res/layout/activity_view_post_detail.xml @@ -5,13 +5,14 @@ android:id="@+id/coordinator_layout_view_post_detail" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/cardViewBackgroundColor" + android:background="?attr/backgroundColor" tools:application=".ViewPostDetailActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_view_post_detail_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 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 5a912c66..613e736e 100644 --- a/app/src/main/res/layout/activity_view_subreddit_detail.xml +++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml @@ -5,12 +5,14 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_view_subreddit_detail_activity" + android:background="?attr/backgroundColor" tools:application=".ViewSubredditDetailActivity"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/appbar_layout_view_subreddit_detail" 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 @@ -50,7 +52,7 @@ android:paddingStart="16dp" android:paddingEnd="16dp" android:layout_below="@id/banner_image_view_view_subreddit_detail_activity" - android:background="@color/backgroundColor"> + android:background="?attr/backgroundColor"> <TextView android:id="@+id/subreddit_name_text_view_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 4567989f..efeee887 100644 --- a/app/src/main/res/layout/activity_view_user_detail.xml +++ b/app/src/main/res/layout/activity_view_user_detail.xml @@ -5,6 +5,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/coordinator_layout_view_user_detail_activity" + android:background="?attr/backgroundColor" tools:application=".ViewUserDetailActivity"> <androidx.viewpager.widget.ViewPager @@ -17,6 +18,7 @@ android:id="@+id/appbar_layout_view_user_detail" 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 @@ -56,7 +58,7 @@ android:paddingStart="16dp" android:paddingEnd="16dp" android:layout_below="@id/banner_image_view_view_user_detail_activity" - android:background="@color/backgroundColor"> + android:background="?attr/backgroundColor"> <TextView android:id="@+id/user_name_text_view_view_user_detail_activity" @@ -106,6 +108,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" + android:background="?attr/toolbarAndTabBackgroundColor" app:layout_scrollFlags="scroll|enterAlways" app:tabGravity="fill" app:tabMode="fixed" diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml index 74776016..c7993b14 100644 --- a/app/src/main/res/layout/app_bar_main.xml +++ b/app/src/main/res/layout/app_bar_main.xml @@ -11,6 +11,7 @@ android:id="@+id/appbar_layout_main_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 @@ -36,7 +37,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" - android:background="@color/greyTabBackgroundColor" + android:background="?attr/toolbarAndTabBackgroundColor" app:layout_scrollFlags="scroll|enterAlways" app:tabGravity="fill" app:tabIndicatorColor="@android:color/white" diff --git a/app/src/main/res/layout/fragment_comments_listing.xml b/app/src/main/res/layout/fragment_comments_listing.xml index 387ed056..18d4854b 100644 --- a/app/src/main/res/layout/fragment_comments_listing.xml +++ b/app/src/main/res/layout/fragment_comments_listing.xml @@ -15,7 +15,7 @@ android:layout_marginBottom="16dp" app:mlpb_progress_stoke_width="3dp" app:mlpb_progress_color="@color/colorAccent" - app:mlpb_background_color="@color/circularProgressBarBackground" + app:mlpb_background_color="?attr/circularProgressBarBackground" android:layout_gravity="center_horizontal"/> <androidx.recyclerview.widget.RecyclerView diff --git a/app/src/main/res/layout/fragment_flair_bottom_sheet.xml b/app/src/main/res/layout/fragment_flair_bottom_sheet.xml index edd8ad20..4cec7313 100644 --- a/app/src/main/res/layout/fragment_flair_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_flair_bottom_sheet.xml @@ -4,6 +4,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" + android:background="?attr/backgroundColor" tools:application=".FlairBottomSheetFragment"> <TextView diff --git a/app/src/main/res/layout/fragment_post.xml b/app/src/main/res/layout/fragment_post.xml index 6e0db44a..56a9290f 100644 --- a/app/src/main/res/layout/fragment_post.xml +++ b/app/src/main/res/layout/fragment_post.xml @@ -13,7 +13,7 @@ android:layout_marginBottom="16dp" app:mlpb_progress_stoke_width="3dp" app:mlpb_progress_color="@color/colorAccent" - app:mlpb_background_color="@color/circularProgressBarBackground" + app:mlpb_background_color="?attr/circularProgressBarBackground" android:layout_gravity="center_horizontal"/> <androidx.recyclerview.widget.RecyclerView diff --git a/app/src/main/res/layout/fragment_subreddit_listing.xml b/app/src/main/res/layout/fragment_subreddit_listing.xml index 780612bb..d956ebc7 100644 --- a/app/src/main/res/layout/fragment_subreddit_listing.xml +++ b/app/src/main/res/layout/fragment_subreddit_listing.xml @@ -15,7 +15,7 @@ android:layout_marginBottom="16dp" app:mlpb_progress_stoke_width="3dp" app:mlpb_progress_color="@color/colorAccent" - app:mlpb_background_color="@color/circularProgressBarBackground" + app:mlpb_background_color="?attr/circularProgressBarBackground" android:layout_gravity="center_horizontal"/> <androidx.recyclerview.widget.RecyclerView diff --git a/app/src/main/res/layout/fragment_user_listing.xml b/app/src/main/res/layout/fragment_user_listing.xml index 0356ef99..7decd8b7 100644 --- a/app/src/main/res/layout/fragment_user_listing.xml +++ b/app/src/main/res/layout/fragment_user_listing.xml @@ -15,7 +15,7 @@ android:layout_marginBottom="16dp" app:mlpb_progress_stoke_width="3dp" app:mlpb_progress_color="@color/colorAccent" - app:mlpb_background_color="@color/circularProgressBarBackground" + app:mlpb_background_color="?attr/circularProgressBarBackground" android:layout_gravity="center_horizontal"/> <androidx.recyclerview.widget.RecyclerView diff --git a/app/src/main/res/layout/item_comment.xml b/app/src/main/res/layout/item_comment.xml index dfdc3374..fc42b046 100644 --- a/app/src/main/res/layout/item_comment.xml +++ b/app/src/main/res/layout/item_comment.xml @@ -5,7 +5,7 @@ android:id="@+id/linear_layout_item_comment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/cardViewBackgroundColor"> + android:background="?attr/cardViewBackgroundColor"> <View android:id="@+id/vertical_block_item_post_comment" diff --git a/app/src/main/res/layout/item_load_comments.xml b/app/src/main/res/layout/item_load_comments.xml index 00bd5877..3558554f 100644 --- a/app/src/main/res/layout/item_load_comments.xml +++ b/app/src/main/res/layout/item_load_comments.xml @@ -12,7 +12,7 @@ android:layout_margin="16dp" app:mlpb_progress_stoke_width="3dp" app:mlpb_progress_color="@color/colorAccent" - app:mlpb_background_color="@color/circularProgressBarBackground" + app:mlpb_background_color="?attr/circularProgressBarBackground" android:layout_gravity="center_horizontal"/> </LinearLayout>
\ No newline at end of file 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 981ac789..9d10a62b 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 @@ -2,7 +2,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@color/cardViewBackgroundColor"> + android:background="?attr/cardViewBackgroundColor"> <View android:id="@+id/vertical_block_item_load_more_comments" diff --git a/app/src/main/res/layout/item_message.xml b/app/src/main/res/layout/item_message.xml index 35b8ada4..cc822cc0 100644 --- a/app/src/main/res/layout/item_message.xml +++ b/app/src/main/res/layout/item_message.xml @@ -2,7 +2,8 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="16dp"> + android:padding="16dp" + android:background="?attr/cardViewBackgroundColor"> <TextView android:id="@+id/author_text_view_item_message" diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml index cc7cc163..ba132a36 100644 --- a/app/src/main/res/layout/item_post.xml +++ b/app/src/main/res/layout/item_post.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> <com.google.android.material.card.MaterialCardView 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="wrap_content" android:layout_marginTop="8dp" android:layout_marginBottom="8dp" android:id="@+id/card_view_item_post" + app:cardBackgroundColor="?attr/cardViewBackgroundColor" app:cardElevation="2dp" app:cardCornerRadius="16dp"> diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml index fe0a2e5b..dc6c4734 100644 --- a/app/src/main/res/layout/item_post_detail.xml +++ b/app/src/main/res/layout/item_post_detail.xml @@ -4,7 +4,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" - android:background="@color/cardViewBackgroundColor"> + android:background="?attr/cardViewBackgroundColor"> <androidx.constraintlayout.widget.ConstraintLayout android:id="@+id/relative_layout_item_post_detail" diff --git a/app/src/main/res/layout/nav_header_main.xml b/app/src/main/res/layout/nav_header_main.xml index a620fbb9..bd578e0d 100644 --- a/app/src/main/res/layout/nav_header_main.xml +++ b/app/src/main/res/layout/nav_header_main.xml @@ -1,6 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <RelativeLayout 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="@dimen/nav_header_height" android:background="@drawable/side_nav_bar" diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 2049c23c..a6e767f1 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -5,15 +5,13 @@ <color name="colorAccent">#FF4081</color> <color name="transparentActionBarAndExoPlayerControllerColor">#88000000</color> - + <color name="gold">#FFC107</color> <color name="primaryTextColor">#FFFFFF</color> <color name="colorPrimaryDarkDayNightTheme">#1E88E5</color> - <color name="circularProgressBarBackground">#242424</color> - <color name="dividerColor">#69666C</color> <color name="grey">#424242</color> @@ -62,5 +60,5 @@ <color name="commentVerticalBar6">#00B925</color> <color name="commentVerticalBar7">#EE4602</color> - <color name="greyTabBackgroundColor">#282828</color> + <color name="toolbarAndTabBackgroundColor">#282828</color> </resources> diff --git a/app/src/main/res/values/attr.xml b/app/src/main/res/values/attr.xml index 201074bd..bd522e6e 100644 --- a/app/src/main/res/values/attr.xml +++ b/app/src/main/res/values/attr.xml @@ -25,4 +25,17 @@ <attr name="content_font_18" format="dimension"/> <attr name="content_font_20" format="dimension"/> </declare-styleable> + + <declare-styleable name="Theme"> + <attr name="colorPrimary" format="color"/> + <attr name="colorPrimaryDark" format="color"/> + <attr name="backgroundColor" format="color"/> + <attr name="roundedBottomSheetPrimaryBackground" format="color"/> + <attr name="cardViewBackgroundColor" format="color"/> + <attr name="toolbarAndTabBackgroundColor" format="color"/> + <attr name="circularProgressBarBackground" format="color"/> + <attr name="tabLayoutWithExpandedCollapsingToolbarTabBackground" format="color"/> + <attr name="tabLayoutWithCollapsedCollapsingToolbarTabBackground" format="color"/> + <attr name="navBarColor" format="color" /> + </declare-styleable> </resources>
\ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 811089f3..2f6087dd 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -12,8 +12,6 @@ <color name="colorPrimaryDarkDayNightTheme">@color/colorPrimaryDark</color> - <color name="circularProgressBarBackground">#FFFFFF</color> - <color name="dividerColor">#E0E0E0</color> <color name="grey">#E0E0E0</color> @@ -70,7 +68,7 @@ <color name="commentVerticalBar6">#02EE6E</color> <color name="commentVerticalBar7">#EE4602</color> - <color name="greyTabBackgroundColor">@color/colorPrimary</color> + <color name="toolbarAndTabBackgroundColor">@color/colorPrimary</color> <color name="submitter">#EE8A02</color> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index c898353c..236b1c4f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -273,6 +273,7 @@ <string name="settings_theme_light__theme_summary">Light Theme</string> <string name="settings_theme_dark_theme_summary">Dark Theme</string> <string name="settings_theme_system_default_summary">Device default</string> + <string name="settings_amoled_dark_title">Amoled Dark</string> <string name="settings_lazy_mode_interval_title">Lazy Mode Interval</string> <string name="settings_font_size_title">Font Size</string> <string name="settings_title_font_size_title">Title Font Size</string> diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 2b6e10bb..698057fd 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -3,8 +3,8 @@ <!-- Base application theme. --> <style name="AppTheme" parent="Theme.MaterialComponents.DayNight"> <!-- Customize your theme here. --> - <item name="colorPrimary">@color/colorPrimary</item> - <item name="colorPrimaryDark">@color/colorPrimaryDark</item> + <item name="colorPrimary">?attr/colorPrimary</item> + <item name="colorPrimaryDark">?attr/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="android:navigationBarColor">@android:color/black</item> <item name="android:textColorPrimary">@android:color/white</item> @@ -46,6 +46,7 @@ <style name="MaterialAlertDialogTheme" parent="ThemeOverlay.MaterialComponents.MaterialAlertDialog"> <item name="android:textSize">?attr/font_default</item> + <item name="android:background">?attr/cardViewBackgroundColor</item> <item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialogTitleTextStyle</item> <item name="materialAlertDialogBodyTextStyle">@style/MaterialAlertDialogBodyTextStyle</item> <item name="buttonBarPositiveButtonStyle">@style/MaterialAlertDialogPositiveButtonStyle</item> @@ -74,6 +75,7 @@ <item name="android:textColorPrimary">@color/primaryTextColor</item> <item name="buttonBarPositiveButtonStyle">@style/MaterialAlertDialogPositiveButtonStyle</item> <item name="buttonBarNegativeButtonStyle">@style/MaterialAlertDialogNegativeButtonStyle</item> + <item name="alertDialogTheme">@style/ListPreferenceStyle</item> </style> <style name="PreferenceTitleTextStyle"> @@ -85,6 +87,10 @@ <item name="android:textSize">?attr/font_default</item> </style> + <style name="ListPreferenceStyle" parent="ThemeOverlay.AppCompat.Dialog.Alert"> + <item name="android:background">?attr/cardViewBackgroundColor</item> + </style> + <style name="FontStyle" /> <style name="FontStyle.Small"> @@ -195,4 +201,45 @@ <item name="content_font_20">26sp</item> </style> + <style name="Theme" /> + + <style name="Theme.Default"> + <item name="colorPrimary">@color/colorPrimary</item> + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> + <item name="backgroundColor">@color/backgroundColor</item> + <item name="roundedBottomSheetPrimaryBackground">@color/roundedBottomSheetPrimaryBackground</item> + <item name="cardViewBackgroundColor">@color/cardViewBackgroundColor</item> + <item name="toolbarAndTabBackgroundColor">@color/toolbarAndTabBackgroundColor</item> + <item name="circularProgressBarBackground">#FFFFFF</item> + <item name="tabLayoutWithExpandedCollapsingToolbarTabBackground">#FFFFFF</item> + <item name="tabLayoutWithCollapsedCollapsingToolbarTabBackground">@color/colorPrimary</item> + <item name="navBarColor">@color/backgroundColor</item> + </style> + + <style name="Theme.Default.NormalDark"> + <item name="colorPrimary">@color/colorPrimary</item> + <item name="colorPrimaryDark">@color/colorPrimaryDark</item> + <item name="backgroundColor">@color/backgroundColor</item> + <item name="roundedBottomSheetPrimaryBackground">@color/roundedBottomSheetPrimaryBackground</item> + <item name="cardViewBackgroundColor">@color/cardViewBackgroundColor</item> + <item name="toolbarAndTabBackgroundColor">@color/toolbarAndTabBackgroundColor</item> + <item name="circularProgressBarBackground">@color/colorPrimary</item> + <item name="tabLayoutWithExpandedCollapsingToolbarTabBackground">@color/backgroundColor</item> + <item name="tabLayoutWithCollapsedCollapsingToolbarTabBackground">@color/colorPrimary</item> + <item name="navBarColor">@color/backgroundColor</item> + </style> + + <style name="Theme.Default.AmoledDark"> + <item name="colorPrimary">#000000</item> + <item name="colorPrimaryDark">#000000</item> + <item name="backgroundColor">#000000</item> + <item name="roundedBottomSheetPrimaryBackground">#000000</item> + <item name="cardViewBackgroundColor">#000000</item> + <item name="toolbarAndTabBackgroundColor">#000000</item> + <item name="circularProgressBarBackground">#000000</item> + <item name="tabLayoutWithExpandedCollapsingToolbarTabBackground">#000000</item> + <item name="tabLayoutWithCollapsedCollapsingToolbarTabBackground">#000000</item> + <item name="navBarColor">#000000</item> + </style> + </resources> diff --git a/app/src/main/res/xml/main_preferences.xml b/app/src/main/res/xml/main_preferences.xml index 8c58411e..7bd2d85e 100644 --- a/app/src/main/res/xml/main_preferences.xml +++ b/app/src/main/res/xml/main_preferences.xml @@ -15,6 +15,11 @@ app:title="@string/settings_theme_title" app:useSimpleSummaryProvider="true" /> + <SwitchPreference + app:defaultValue="false" + app:key="amoled_dark" + app:title="@string/settings_amoled_dark_title" /> + <ListPreference app:defaultValue="2.5" android:entries="@array/settings_lazy_mode_interval" |