From 747f5f1a239925958ba1e7dce3c422d4b42a6767 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:09:43 -0400 Subject: Start implementing PostOptionsBottomSheetFragment. Rename some drawables. --- .../activities/CustomizePostFilterActivity.java | 14 +-- .../activities/LoginActivity.java | 2 +- .../infinityforreddit/activities/MainActivity.java | 56 +++++----- .../activities/SearchResultActivity.java | 22 ++-- .../activities/SubmitCrosspostActivity.java | 2 +- .../activities/ViewMultiRedditDetailActivity.java | 58 +++++----- .../activities/ViewSubredditDetailActivity.java | 58 +++++----- .../activities/ViewUserDetailActivity.java | 58 +++++----- .../adapters/HistoryPostRecyclerViewAdapter.java | 100 ++++++++--------- .../MarkdownBottomBarRecyclerViewAdapter.java | 4 +- .../adapters/PostDetailRecyclerViewAdapter.java | 14 +-- .../PostFilterWithUsageRecyclerViewAdapter.java | 2 +- .../adapters/PostRecyclerViewAdapter.java | 122 +++++++++++---------- ...ccountManagementSectionRecyclerViewAdapter.java | 8 +- .../AccountSectionRecyclerViewAdapter.java | 16 +-- .../PostSectionRecyclerViewAdapter.java | 8 +- .../PreferenceSectionRecyclerViewAdapter.java | 10 +- .../CommentMoreBottomSheetFragment.java | 4 +- .../PlaybackSpeedBottomSheetFragment.java | 16 +-- .../PostCommentSortTypeBottomSheetFragment.java | 16 +-- .../PostOptionsBottomSheetFragment.java | 63 +++++++++++ .../SearchPostSortTypeBottomSheetFragment.java | 10 +- ...serAndSubredditSortTypeBottomSheetFragment.java | 4 +- .../ShareLinkBottomSheetFragment.java | 6 +- .../SortTypeBottomSheetFragment.java | 12 +- .../UserThingSortTypeBottomSheetFragment.java | 8 +- .../fragments/CommentsListingFragment.java | 8 +- .../fragments/HistoryPostFragment.java | 8 +- .../infinityforreddit/fragments/PostFragment.java | 8 +- .../fragments/ViewPostDetailFragment.java | 8 +- .../settings/CustomizeBottomAppBarFragment.java | 2 +- .../settings/CustomizeMainPageTabsFragment.java | 2 +- .../settings/NsfwAndSpoilerFragment.java | 2 +- .../settings/PostHistoryFragment.java | 2 +- 34 files changed, 404 insertions(+), 329 deletions(-) create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostOptionsBottomSheetFragment.java (limited to 'app/src/main/java/ml') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java index ca56bcdf..c4b93a34 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java @@ -264,22 +264,22 @@ public class CustomizePostFilterActivity extends BaseActivity { binding.postTypeCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor); binding.postTypeExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); - binding.postTypeTextTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_text_24dp, primaryIconColor), null, null, null); + binding.postTypeTextTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_text_day_night_24dp, primaryIconColor), null, null, null); binding.postTypeTextTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); - binding.postTypeLinkTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_link, primaryIconColor), null, null, null); + binding.postTypeLinkTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_link_day_night_24dp, primaryIconColor), null, null, null); binding.postTypeLinkTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); - binding.postTypeImageTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_image_24dp, primaryIconColor), null, null, null); + binding.postTypeImageTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_image_day_night_24dp, primaryIconColor), null, null, null); binding.postTypeImageTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); - binding.postTypeGifTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_image_24dp, primaryIconColor), null, null, null); + binding.postTypeGifTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_image_day_night_24dp, primaryIconColor), null, null, null); binding.postTypeGifTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); - binding.postTypeVideoTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_outline_video_24dp, primaryIconColor), null, null, null); + binding.postTypeVideoTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_video_day_night_24dp, primaryIconColor), null, null, null); binding.postTypeVideoTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); - binding.postTypeGalleryTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_gallery_24dp, primaryIconColor), null, null, null); + binding.postTypeGalleryTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_gallery_day_night_24dp, primaryIconColor), null, null, null); binding.postTypeGalleryTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); binding.onlyNsfwSpoilerCardViewCustomizePostFilterActivity.setCardBackgroundColor(filledCardViewBackgroundColor); binding.onlyNsfwSpoilerExplanationTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); - binding.onlyNsfwTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_nsfw_on_24dp, primaryIconColor), null, null, null); + binding.onlyNsfwTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_nsfw_on_day_night_24dp, primaryIconColor), null, null, null); binding.onlyNsfwTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); binding.onlySpoilerTextViewCustomizePostFilterActivity.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(this, R.drawable.ic_spoiler_black_24dp, primaryIconColor), null, null, null); binding.onlySpoilerTextViewCustomizePostFilterActivity.setTextColor(primaryTextColor); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LoginActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LoginActivity.java index 99d134dd..3d20da35 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LoginActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/LoginActivity.java @@ -288,7 +288,7 @@ public class LoginActivity extends BaseActivity { binding.getRoot().setBackgroundColor(mCustomThemeWrapper.getBackgroundColor()); applyAppBarLayoutAndCollapsingToolbarLayoutAndToolbarTheme(binding.appbarLayoutLoginActivity, null, binding.toolbarLoginActivity); binding.twoFaInfOTextViewLoginActivity.setTextColor(mCustomThemeWrapper.getPrimaryTextColor()); - Drawable infoDrawable = Utils.getTintedDrawable(this, R.drawable.ic_info_preference_24dp, mCustomThemeWrapper.getPrimaryIconColor()); + Drawable infoDrawable = Utils.getTintedDrawable(this, R.drawable.ic_info_preference_day_night_24dp, mCustomThemeWrapper.getPrimaryIconColor()); binding.twoFaInfOTextViewLoginActivity.setCompoundDrawablesWithIntrinsicBounds(infoDrawable, null, null, null); applyFABTheme(binding.fabLoginActivity); if (typeface != null) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java index e49ec447..64f28a26 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/MainActivity.java @@ -510,43 +510,43 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb private int getBottomAppBarOptionDrawableResource(int option) { switch (option) { case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS: - return R.drawable.ic_subscritptions_bottom_app_bar_24dp; + return R.drawable.ic_subscriptions_bottom_app_bar_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_MULTIREDDITS: - return R.drawable.ic_multi_reddit_24dp; + return R.drawable.ic_multi_reddit_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_INBOX: - return R.drawable.ic_inbox_24dp; + return R.drawable.ic_inbox_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SUBMIT_POSTS: return R.drawable.ic_add_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_REFRESH: - return R.drawable.ic_refresh_24dp; + return R.drawable.ic_refresh_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_CHANGE_SORT_TYPE: return R.drawable.ic_sort_toolbar_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_CHANGE_POST_LAYOUT: - return R.drawable.ic_post_layout_24dp; + return R.drawable.ic_post_layout_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SEARCH: - return R.drawable.ic_search_24dp; + return R.drawable.ic_search_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GO_TO_SUBREDDIT: - return R.drawable.ic_subreddit_24dp; + return R.drawable.ic_subreddit_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GO_TO_USER: - return R.drawable.ic_user_24dp; + return R.drawable.ic_user_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_RANDOM: - return R.drawable.ic_random_24dp; + return R.drawable.ic_random_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_HIDE_READ_POSTS: - return R.drawable.ic_hide_read_posts_24dp; + return R.drawable.ic_hide_read_posts_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_FILTER_POSTS: - return R.drawable.ic_filter_24dp; + return R.drawable.ic_filter_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_UPVOTED: - return R.drawable.ic_arrow_upward_black_24dp; + return R.drawable.ic_arrow_upward_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_DOWNVOTED: - return R.drawable.ic_arrow_downward_black_24dp; + return R.drawable.ic_arrow_downward_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_HIDDEN: - return R.drawable.ic_outline_lock_24dp; + return R.drawable.ic_lock_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_SAVED: - return R.drawable.ic_outline_bookmarks_24dp; + return R.drawable.ic_bookmarks_day_night_24dp; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: - return R.drawable.ic_keyboard_double_arrow_up_24; + return R.drawable.ic_keyboard_double_arrow_up_day_night_24dp; default: - return R.drawable.ic_account_circle_24dp; + return R.drawable.ic_account_circle_day_night_24dp; } } @@ -647,7 +647,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS); switch (fabOption) { case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_REFRESH: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_refresh_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_refresh_day_night_24dp); navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_refresh)); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: @@ -655,46 +655,46 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_change_sort_type)); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_post_layout_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_post_layout_day_night_24dp); navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_change_post_layout)); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SEARCH: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_search_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_search_day_night_24dp); navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_search)); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_GO_TO_SUBREDDIT: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_subreddit_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_subreddit_day_night_24dp); navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_go_to_subreddit)); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_GO_TO_USER: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_user_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_user_day_night_24dp); navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_go_to_user)); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_RANDOM: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_random_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_random_day_night_24dp); navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_random)); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_HIDE_READ_POSTS: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_FILTER_POSTS; navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_filter_posts)); } else { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_hide_read_posts_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_hide_read_posts_day_night_24dp); navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_hide_read_posts)); } break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_FILTER_POSTS: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_filter_posts)); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_GO_TO_TOP: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_keyboard_double_arrow_up_24); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_keyboard_double_arrow_up_day_night_24dp); navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_go_to_top)); break; default: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_FILTER_POSTS; navigationWrapper.floatingActionButton.setContentDescription(getString(R.string.content_description_filter_posts)); } else { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchResultActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchResultActivity.java index 77c59575..9685630f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchResultActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SearchResultActivity.java @@ -279,43 +279,43 @@ public class SearchResultActivity extends BaseActivity implements SortTypeSelect fabOption = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS); switch (fabOption) { case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH: - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_refresh_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_refresh_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: binding.fabSearchResultActivity.setImageResource(R.drawable.ic_sort_toolbar_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_post_layout_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_post_layout_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SEARCH: - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_search_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_search_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_SUBREDDIT: - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_subreddit_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_subreddit_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_USER: - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_user_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_user_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_RANDOM: - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_random_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_random_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_HIDE_READ_POSTS: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_filter_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; } else { - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_hide_read_posts_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_hide_read_posts_day_night_24dp); } break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS: - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_filter_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_filter_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_TOP: - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_keyboard_double_arrow_up_24); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_keyboard_double_arrow_up_day_night_24dp); break; default: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - binding.fabSearchResultActivity.setImageResource(R.drawable.ic_filter_24dp); + binding.fabSearchResultActivity.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; } else { binding.fabSearchResultActivity.setImageResource(R.drawable.ic_add_day_night_24dp); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubmitCrosspostActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubmitCrosspostActivity.java index 956f8d05..df885e2c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubmitCrosspostActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubmitCrosspostActivity.java @@ -254,7 +254,7 @@ public class SubmitCrosspostActivity extends BaseActivity implements FlairBottom binding.playButtonImageViewSubmitCrosspostActivity.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_play_circle_36dp)); } else if (post.getPostType() == Post.GALLERY_TYPE) { binding.playButtonImageViewSubmitCrosspostActivity.setVisibility(View.VISIBLE); - binding.playButtonImageViewSubmitCrosspostActivity.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_gallery_24dp)); + binding.playButtonImageViewSubmitCrosspostActivity.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_gallery_day_night_24dp)); } } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java index 47425b0a..436b1184 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewMultiRedditDetailActivity.java @@ -308,43 +308,43 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT fabOption = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS); switch (fabOption) { case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_refresh_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_refresh_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_sort_toolbar_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_post_layout_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_post_layout_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SEARCH: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_search_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_search_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_SUBREDDIT: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_subreddit_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_subreddit_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_USER: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_user_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_user_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_RANDOM: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_random_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_random_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_HIDE_READ_POSTS: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; } else { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_hide_read_posts_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_hide_read_posts_day_night_24dp); } break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_TOP: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_keyboard_double_arrow_up_24); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_keyboard_double_arrow_up_day_night_24dp); break; default: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; } else { navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_add_day_night_24dp); @@ -529,45 +529,45 @@ public class ViewMultiRedditDetailActivity extends BaseActivity implements SortT private int getBottomAppBarOptionDrawableResource(int option) { switch (option) { case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HOME: - return R.drawable.ic_home_black_24dp; + return R.drawable.ic_home_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS: - return R.drawable.ic_subscritptions_bottom_app_bar_24dp; + return R.drawable.ic_subscriptions_bottom_app_bar_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_INBOX: - return R.drawable.ic_inbox_24dp; + return R.drawable.ic_inbox_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_MULTIREDDITS: - return R.drawable.ic_multi_reddit_24dp; + return R.drawable.ic_multi_reddit_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBMIT_POSTS: return R.drawable.ic_add_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_REFRESH: - return R.drawable.ic_refresh_24dp; + return R.drawable.ic_refresh_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_CHANGE_SORT_TYPE: return R.drawable.ic_sort_toolbar_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_CHANGE_POST_LAYOUT: - return R.drawable.ic_post_layout_24dp; + return R.drawable.ic_post_layout_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SEARCH: - return R.drawable.ic_search_24dp; + return R.drawable.ic_search_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_SUBREDDIT: - return R.drawable.ic_subreddit_24dp; + return R.drawable.ic_subreddit_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_USER: - return R.drawable.ic_user_24dp; + return R.drawable.ic_user_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_RANDOM: - return R.drawable.ic_random_24dp; + return R.drawable.ic_random_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HIDE_READ_POSTS: - return R.drawable.ic_hide_read_posts_24dp; + return R.drawable.ic_hide_read_posts_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_FILTER_POSTS: - return R.drawable.ic_filter_24dp; + return R.drawable.ic_filter_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_UPVOTED: - return R.drawable.ic_arrow_upward_black_24dp; + return R.drawable.ic_arrow_upward_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_DOWNVOTED: - return R.drawable.ic_arrow_downward_black_24dp; + return R.drawable.ic_arrow_downward_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HIDDEN: - return R.drawable.ic_outline_lock_24dp; + return R.drawable.ic_lock_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SAVED: - return R.drawable.ic_outline_bookmarks_24dp; + return R.drawable.ic_bookmarks_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: - return R.drawable.ic_keyboard_double_arrow_up_24; + return R.drawable.ic_keyboard_double_arrow_up_day_night_24dp; default: - return R.drawable.ic_account_circle_24dp; + return R.drawable.ic_account_circle_day_night_24dp; } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java index 25869ef0..a13b6e3e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewSubredditDetailActivity.java @@ -703,45 +703,45 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp private int getBottomAppBarOptionDrawableResource(int option) { switch (option) { case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HOME: - return R.drawable.ic_home_black_24dp; + return R.drawable.ic_home_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS: - return R.drawable.ic_subscritptions_bottom_app_bar_24dp; + return R.drawable.ic_subscriptions_bottom_app_bar_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_INBOX: - return R.drawable.ic_inbox_24dp; + return R.drawable.ic_inbox_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_MULTIREDDITS: - return R.drawable.ic_multi_reddit_24dp; + return R.drawable.ic_multi_reddit_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBMIT_POSTS: return R.drawable.ic_add_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_REFRESH: - return R.drawable.ic_refresh_24dp; + return R.drawable.ic_refresh_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_CHANGE_SORT_TYPE: return R.drawable.ic_sort_toolbar_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_CHANGE_POST_LAYOUT: - return R.drawable.ic_post_layout_24dp; + return R.drawable.ic_post_layout_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SEARCH: - return R.drawable.ic_search_24dp; + return R.drawable.ic_search_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_SUBREDDIT: - return R.drawable.ic_subreddit_24dp; + return R.drawable.ic_subreddit_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_USER: - return R.drawable.ic_user_24dp; + return R.drawable.ic_user_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_RANDOM: - return R.drawable.ic_random_24dp; + return R.drawable.ic_random_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HIDE_READ_POSTS: - return R.drawable.ic_hide_read_posts_24dp; + return R.drawable.ic_hide_read_posts_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_FILTER_POSTS: - return R.drawable.ic_filter_24dp; + return R.drawable.ic_filter_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_UPVOTED: - return R.drawable.ic_arrow_upward_black_24dp; + return R.drawable.ic_arrow_upward_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_DOWNVOTED: - return R.drawable.ic_arrow_downward_black_24dp; + return R.drawable.ic_arrow_downward_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HIDDEN: - return R.drawable.ic_outline_lock_24dp; + return R.drawable.ic_lock_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SAVED: - return R.drawable.ic_outline_bookmarks_24dp; + return R.drawable.ic_bookmarks_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: - return R.drawable.ic_keyboard_double_arrow_up_24; + return R.drawable.ic_keyboard_double_arrow_up_day_night_24dp; default: - return R.drawable.ic_account_circle_24dp; + return R.drawable.ic_account_circle_day_night_24dp; } } @@ -851,43 +851,43 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp fabOption = mBottomAppBarSharedPreference.getInt((accountName.equals(Account.ANONYMOUS_ACCOUNT) ? Account.ANONYMOUS_ACCOUNT : "") + SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS); switch (fabOption) { case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_refresh_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_refresh_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_sort_toolbar_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_post_layout_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_post_layout_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SEARCH: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_search_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_search_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_SUBREDDIT: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_subreddit_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_subreddit_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_USER: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_user_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_user_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_RANDOM: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_random_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_random_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_HIDE_READ_POSTS: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; } else { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_hide_read_posts_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_hide_read_posts_day_night_24dp); } break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_TOP: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_keyboard_double_arrow_up_24); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_keyboard_double_arrow_up_day_night_24dp); break; default: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; } else { navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_add_day_night_24dp); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java index c0984cbe..c9c819a8 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java @@ -801,43 +801,43 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele fabOption = mBottomAppBarSharedPreference.getInt((accountName.equals(Account.ANONYMOUS_ACCOUNT) ? Account.ANONYMOUS_ACCOUNT : "") + SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS); switch (fabOption) { case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_refresh_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_refresh_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_sort_toolbar_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_post_layout_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_post_layout_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SEARCH: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_search_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_search_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_SUBREDDIT: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_subreddit_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_subreddit_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_USER: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_user_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_user_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_RANDOM: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_random_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_random_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_HIDE_READ_POSTS: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; } else { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_hide_read_posts_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_hide_read_posts_day_night_24dp); } break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_GO_TO_TOP: - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_keyboard_double_arrow_up_24); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_keyboard_double_arrow_up_day_night_24dp); break; default: if (accountName.equals(Account.ANONYMOUS_ACCOUNT)) { - navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_24dp); + navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_filter_day_night_24dp); fabOption = SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_FILTER_POSTS; } else { navigationWrapper.floatingActionButton.setImageResource(R.drawable.ic_add_day_night_24dp); @@ -1019,45 +1019,45 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele private int getBottomAppBarOptionDrawableResource(int option) { switch (option) { case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HOME: - return R.drawable.ic_home_black_24dp; + return R.drawable.ic_home_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBSCRIPTIONS: - return R.drawable.ic_subscritptions_bottom_app_bar_24dp; + return R.drawable.ic_subscriptions_bottom_app_bar_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_INBOX: - return R.drawable.ic_inbox_24dp; + return R.drawable.ic_inbox_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_MULTIREDDITS: - return R.drawable.ic_multi_reddit_24dp; + return R.drawable.ic_multi_reddit_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SUBMIT_POSTS: return R.drawable.ic_add_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_REFRESH: - return R.drawable.ic_refresh_24dp; + return R.drawable.ic_refresh_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_CHANGE_SORT_TYPE: return R.drawable.ic_sort_toolbar_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_CHANGE_POST_LAYOUT: - return R.drawable.ic_post_layout_24dp; + return R.drawable.ic_post_layout_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SEARCH: - return R.drawable.ic_search_24dp; + return R.drawable.ic_search_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_SUBREDDIT: - return R.drawable.ic_subreddit_24dp; + return R.drawable.ic_subreddit_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_USER: - return R.drawable.ic_user_24dp; + return R.drawable.ic_user_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_RANDOM: - return R.drawable.ic_random_24dp; + return R.drawable.ic_random_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HIDE_READ_POSTS: - return R.drawable.ic_hide_read_posts_24dp; + return R.drawable.ic_hide_read_posts_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_FILTER_POSTS: - return R.drawable.ic_filter_24dp; + return R.drawable.ic_filter_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_UPVOTED: - return R.drawable.ic_arrow_upward_black_24dp; + return R.drawable.ic_arrow_upward_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_DOWNVOTED: - return R.drawable.ic_arrow_downward_black_24dp; + return R.drawable.ic_arrow_downward_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_HIDDEN: - return R.drawable.ic_outline_lock_24dp; + return R.drawable.ic_lock_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_SAVED: - return R.drawable.ic_outline_bookmarks_24dp; + return R.drawable.ic_bookmarks_day_night_24dp; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_OPTION_GO_TO_TOP: - return R.drawable.ic_keyboard_double_arrow_up_24; + return R.drawable.ic_keyboard_double_arrow_up_day_night_24dp; default: - return R.drawable.ic_account_circle_24dp; + return R.drawable.ic_account_circle_day_night_24dp; } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java index 5cda5a7f..bab066b1 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/HistoryPostRecyclerViewAdapter.java @@ -850,29 +850,29 @@ public class HistoryPostRecyclerViewAdapter extends PagingDataAdapter imageRequestBuilder = mGlide.load(postCompactThumbnailPreviewUrl) - .error(R.drawable.ic_error_outline_black_24dp).listener(((PostCompactBaseViewHolder) holder).requestListener); + .error(R.drawable.ic_error_outline_black_day_night_24dp).listener(((PostCompactBaseViewHolder) holder).requestListener); if ((post.isNSFW() && mNeedBlurNsfw) || (post.isSpoiler() && mNeedBlurSpoiler)) { imageRequestBuilder .transform(new BlurTransformation(50, 2)).into(((PostCompactBaseViewHolder) holder).imageView); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MarkdownBottomBarRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MarkdownBottomBarRecyclerViewAdapter.java index ac99ad82..73405851 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MarkdownBottomBarRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/MarkdownBottomBarRecyclerViewAdapter.java @@ -88,7 +88,7 @@ public class MarkdownBottomBarRecyclerViewAdapter extends RecyclerView.Adapter imageRequestBuilder = mGlide.load(postCompactThumbnailPreviewUrl) - .error(R.drawable.ic_error_outline_black_24dp).listener(((PostCompactBaseViewHolder) holder).requestListener); + .error(R.drawable.ic_error_outline_black_day_night_24dp).listener(((PostCompactBaseViewHolder) holder).requestListener); if ((post.isNSFW() && mNeedBlurNsfw && !(mDoNotBlurNsfwInNsfwSubreddits && mFragment != null && mFragment.getIsNsfwSubreddit())) || (post.isSpoiler() && mNeedBlurSpoiler)) { imageRequestBuilder .transform(new BlurTransformation(50, 2)).into(((PostCompactBaseViewHolder) holder).imageView); @@ -2825,6 +2826,17 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter { + Post post = getItem(getBindingAdapterPosition()); + if (post == null) { + return false; + } + + PostOptionsBottomSheetFragment postOptionsBottomSheetFragment = PostOptionsBottomSheetFragment.newInstance(post); + postOptionsBottomSheetFragment.show(mActivity.getSupportFragmentManager(), postOptionsBottomSheetFragment.getTag()); + return true; + }); + itemView.setOnTouchListener((v, event) -> { if (event.getActionMasked() == MotionEvent.ACTION_UP || event.getActionMasked() == MotionEvent.ACTION_CANCEL) { if (mFragment.isRecyclerViewItemSwipeable(PostBaseViewHolder.this)) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountManagementSectionRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountManagementSectionRecyclerViewAdapter.java index a921b8cd..8d365f5c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountManagementSectionRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountManagementSectionRecyclerViewAdapter.java @@ -80,17 +80,17 @@ public class AccountManagementSectionRecyclerViewAdapter extends RecyclerView.Ad int offset = accounts == null ? 0 : accounts.size(); if (position == offset) { stringId = R.string.add_account; - drawableId = R.drawable.ic_outline_add_circle_outline_24dp; + drawableId = R.drawable.ic_add_circle_outline_day_night_24dp; } else if (position == offset + 1) { stringId = R.string.anonymous_account; - drawableId = R.drawable.ic_anonymous_24dp; + drawableId = R.drawable.ic_anonymous_day_night_24dp; } else if (position == offset + 2) { stringId = R.string.log_out; - drawableId = R.drawable.ic_log_out_24dp; + drawableId = R.drawable.ic_log_out_day_night_24dp; } } else { stringId = R.string.add_account; - drawableId = R.drawable.ic_outline_add_circle_outline_24dp; + drawableId = R.drawable.ic_add_circle_outline_day_night_24dp; } if (stringId != 0) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountSectionRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountSectionRecyclerViewAdapter.java index b91a8b7a..218b6a75 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountSectionRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/navigationdrawer/AccountSectionRecyclerViewAdapter.java @@ -91,15 +91,15 @@ public class AccountSectionRecyclerViewAdapter extends RecyclerView.Adapter { Intent intent = new Intent(baseActivity, InboxActivity.class); baseActivity.startActivity(intent); @@ -116,22 +116,22 @@ public class AccountSectionRecyclerViewAdapter extends RecyclerView.Adapter { if (isNSFWEnabled) { isNSFWEnabled = false; ((MenuItemViewHolder) holder).binding.textViewItemNavDrawerMenuItem.setText(R.string.enable_nsfw); - ((MenuItemViewHolder) holder).binding.imageViewItemNavDrawerMenuItem.setImageDrawable(ContextCompat.getDrawable(baseActivity, R.drawable.ic_nsfw_on_24dp)); + ((MenuItemViewHolder) holder).binding.imageViewItemNavDrawerMenuItem.setImageDrawable(ContextCompat.getDrawable(baseActivity, R.drawable.ic_nsfw_on_day_night_24dp)); itemClickListener.onMenuClick(R.string.disable_nsfw); } else { isNSFWEnabled = true; ((MenuItemViewHolder) holder).binding.textViewItemNavDrawerMenuItem.setText(R.string.disable_nsfw); - ((MenuItemViewHolder) holder).binding.imageViewItemNavDrawerMenuItem.setImageDrawable(ContextCompat.getDrawable(baseActivity, R.drawable.ic_nsfw_off_24dp)); + ((MenuItemViewHolder) holder).binding.imageViewItemNavDrawerMenuItem.setImageDrawable(ContextCompat.getDrawable(baseActivity, R.drawable.ic_nsfw_off_day_night_24dp)); itemClickListener.onMenuClick(R.string.enable_nsfw); } }); break; case 3: stringId = R.string.settings; - drawableId = R.drawable.ic_settings_24dp; + drawableId = R.drawable.ic_settings_day_night_24dp; } if (stringId != 0) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java index 6daf7b86..6b0078f6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/CommentMoreBottomSheetFragment.java @@ -113,10 +113,10 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott binding.replyTextViewCommentMoreBottomSheetFragment.setVisibility(View.VISIBLE); binding.saveTextViewCommentMoreBottomSheetFragment.setVisibility(View.VISIBLE); if (comment.isSaved()) { - binding.saveTextViewCommentMoreBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(activity, R.drawable.ic_bookmark_24dp), null, null, null); + binding.saveTextViewCommentMoreBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(activity, R.drawable.ic_bookmark_day_night_24dp), null, null, null); binding.saveTextViewCommentMoreBottomSheetFragment.setText(R.string.unsave_comment); } else { - binding.saveTextViewCommentMoreBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(activity, R.drawable.ic_bookmark_border_24dp), null, null, null); + binding.saveTextViewCommentMoreBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(activity, R.drawable.ic_bookmark_border_day_night_24dp), null, null, null); binding.saveTextViewCommentMoreBottomSheetFragment.setText(R.string.save_comment); } binding.replyTextViewCommentMoreBottomSheetFragment.setOnClickListener(view -> { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PlaybackSpeedBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PlaybackSpeedBottomSheetFragment.java index 099e4ecf..e0fbb151 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PlaybackSpeedBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PlaybackSpeedBottomSheetFragment.java @@ -39,28 +39,28 @@ public class PlaybackSpeedBottomSheetFragment extends LandscapeExpandedRoundedBo int playbackSpeed = getArguments().getInt(EXTRA_PLAYBACK_SPEED, ViewVideoActivity.PLAYBACK_SPEED_NORMAL); switch (playbackSpeed) { case ViewVideoActivity.PLAYBACK_SPEED_25: - binding.playbackSpeed025TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_24dp, 0); + binding.playbackSpeed025TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_day_night_24dp, 0); break; case ViewVideoActivity.PLAYBACK_SPEED_50: - binding.playbackSpeed050TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_24dp, 0); + binding.playbackSpeed050TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_day_night_24dp, 0); break; case ViewVideoActivity.PLAYBACK_SPEED_75: - binding.playbackSpeed075TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_24dp, 0); + binding.playbackSpeed075TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_day_night_24dp, 0); break; case ViewVideoActivity.PLAYBACK_SPEED_NORMAL: - binding.playbackSpeedNormalTextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_24dp, 0); + binding.playbackSpeedNormalTextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_day_night_24dp, 0); break; case ViewVideoActivity.PLAYBACK_SPEED_125: - binding.playbackSpeed125TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_24dp, 0); + binding.playbackSpeed125TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_day_night_24dp, 0); break; case ViewVideoActivity.PLAYBACK_SPEED_150: - binding.playbackSpeed150TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_24dp, 0); + binding.playbackSpeed150TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_day_night_24dp, 0); break; case ViewVideoActivity.PLAYBACK_SPEED_175: - binding.playbackSpeed175TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_24dp, 0); + binding.playbackSpeed175TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_day_night_24dp, 0); break; case ViewVideoActivity.PLAYBACK_SPEED_200: - binding.playbackSpeed200TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_24dp, 0); + binding.playbackSpeed200TextViewPlaybackSpeedBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds(0, 0, R.drawable.ic_playback_speed_day_night_24dp, 0); break; } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostCommentSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostCommentSortTypeBottomSheetFragment.java index 7d396c3c..ff8102b8 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostCommentSortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostCommentSortTypeBottomSheetFragment.java @@ -51,21 +51,21 @@ public class PostCommentSortTypeBottomSheetFragment extends LandscapeExpandedRou SortType.Type currentSortType = (SortType.Type) getArguments().getSerializable(EXTRA_CURRENT_SORT_TYPE); if (currentSortType.equals(SortType.Type.BEST) || currentSortType.equals(SortType.Type.CONFIDENCE)) { - binding.bestTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.bestTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.bestTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.bestTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.TOP)) { - binding.topTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.topTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.topTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.topTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.NEW)) { - binding.newTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.newTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.newTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.newTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.CONTROVERSIAL)) { - binding.controversialTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.controversialTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.controversialTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.controversialTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.OLD)) { - binding.oldTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.oldTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.oldTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.oldTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.RANDOM)) { - binding.randomTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.randomTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.randomTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.randomTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.QA)) { - binding.qaTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.qaTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.qaTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.qaTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.LIVE)) { - binding.liveTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.liveTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.liveTypeTextViewPostCommentSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.liveTypeTextViewPostCommentSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostOptionsBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostOptionsBottomSheetFragment.java new file mode 100644 index 00000000..4e2f9ca2 --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/PostOptionsBottomSheetFragment.java @@ -0,0 +1,63 @@ +package ml.docilealligator.infinityforreddit.bottomsheetfragments; + +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; + +import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment; +import ml.docilealligator.infinityforreddit.databinding.FragmentPostOptionsBottomSheetBinding; +import ml.docilealligator.infinityforreddit.post.Post; + +/** + * A simple {@link Fragment} subclass. + * Use the {@link PostOptionsBottomSheetFragment#newInstance} factory method to + * create an instance of this fragment. + */ +public class PostOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment { + + private static final String EXTRA_POST = "EP"; + + private Post mPost; + private FragmentPostOptionsBottomSheetBinding binding; + + public PostOptionsBottomSheetFragment() { + // Required empty public constructor + } + + /** + * Use this factory method to create a new instance of + * this fragment using the provided parameters. + * + * @param post Post + * @return A new instance of fragment PostOptionsBottomSheetFragment. + */ + public static PostOptionsBottomSheetFragment newInstance(Post post) { + PostOptionsBottomSheetFragment fragment = new PostOptionsBottomSheetFragment(); + Bundle args = new Bundle(); + args.putParcelable(EXTRA_POST, post); + fragment.setArguments(args); + return fragment; + } + + @Override + public void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + if (getArguments() != null) { + mPost = getArguments().getParcelable(EXTRA_POST); + } else { + dismiss(); + } + } + + @Override + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + binding = FragmentPostOptionsBottomSheetBinding.inflate(inflater, container, false); + return binding.getRoot(); + } +} \ No newline at end of file diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SearchPostSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SearchPostSortTypeBottomSheetFragment.java index f07a41db..85d49273 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SearchPostSortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SearchPostSortTypeBottomSheetFragment.java @@ -49,15 +49,15 @@ public class SearchPostSortTypeBottomSheetFragment extends LandscapeExpandedRoun String currentSortType = getArguments().getString(EXTRA_CURRENT_SORT_TYPE); if (currentSortType.equals(SortType.Type.RELEVANCE.fullName)) { - binding.relevanceTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.relevanceTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.relevanceTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.relevanceTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.HOT.fullName)) { - binding.hotTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.hotTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.hotTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.hotTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.TOP.fullName)) { - binding.topTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.topTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.topTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.topTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.NEW.fullName)) { - binding.newTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.newTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.newTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.newTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.RISING.fullName)) { - binding.commentsTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.commentsTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.commentsTypeTextViewSearchSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.commentsTypeTextViewSearchSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SearchUserAndSubredditSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SearchUserAndSubredditSortTypeBottomSheetFragment.java index 978ff641..9cc38685 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SearchUserAndSubredditSortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SearchUserAndSubredditSortTypeBottomSheetFragment.java @@ -52,9 +52,9 @@ public class SearchUserAndSubredditSortTypeBottomSheetFragment extends Landscape String currentSortType = getArguments().getString(EXTRA_CURRENT_SORT_TYPE); if (currentSortType.equals(SortType.Type.RELEVANCE.fullName)) { - binding.relevanceTypeTextViewSearchUserAndSubredditSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.relevanceTypeTextViewSearchUserAndSubredditSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.relevanceTypeTextViewSearchUserAndSubredditSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.relevanceTypeTextViewSearchUserAndSubredditSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.ACTIVITY.fullName)) { - binding.activityTypeTextViewSearchUserAndSubredditSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.activityTypeTextViewSearchUserAndSubredditSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.activityTypeTextViewSearchUserAndSubredditSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.activityTypeTextViewSearchUserAndSubredditSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java index 35632d3a..e4e43156 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java @@ -59,19 +59,19 @@ public class ShareLinkBottomSheetFragment extends LandscapeExpandedRoundedBottom binding.shareMediaLinkTextViewShareLinkBottomSheetFragment.setText(R.string.share_image_link); binding.copyMediaLinkTextViewShareLinkBottomSheetFragment.setText(R.string.copy_image_link); binding.shareMediaLinkTextViewShareLinkBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds( - activity.getDrawable(R.drawable.ic_image_24dp), null, null, null); + activity.getDrawable(R.drawable.ic_image_day_night_24dp), null, null, null); break; case Post.GIF_TYPE: binding.shareMediaLinkTextViewShareLinkBottomSheetFragment.setText(R.string.share_gif_link); binding.copyMediaLinkTextViewShareLinkBottomSheetFragment.setText(R.string.copy_gif_link); binding.shareMediaLinkTextViewShareLinkBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds( - activity.getDrawable(R.drawable.ic_image_24dp), null, null, null); + activity.getDrawable(R.drawable.ic_image_day_night_24dp), null, null, null); break; case Post.VIDEO_TYPE: binding.shareMediaLinkTextViewShareLinkBottomSheetFragment.setText(R.string.share_video_link); binding.copyMediaLinkTextViewShareLinkBottomSheetFragment.setText(R.string.copy_video_link); binding.shareMediaLinkTextViewShareLinkBottomSheetFragment.setCompoundDrawablesWithIntrinsicBounds( - activity.getDrawable(R.drawable.ic_outline_video_24dp), null, null, null); + activity.getDrawable(R.drawable.ic_video_day_night_24dp), null, null, null); break; case Post.LINK_TYPE: case Post.NO_PREVIEW_LINK_TYPE: diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SortTypeBottomSheetFragment.java index 3d21f8c6..9a5a7454 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/SortTypeBottomSheetFragment.java @@ -65,17 +65,17 @@ public class SortTypeBottomSheetFragment extends LandscapeExpandedRoundedBottomS String currentSortType = getArguments().getString(EXTRA_CURRENT_SORT_TYPE); if (currentSortType.equals(SortType.Type.BEST.fullName)) { - binding.bestTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.bestTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.bestTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.bestTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.HOT.fullName)) { - binding.hotTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.hotTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.hotTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.hotTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.NEW.fullName)) { - binding.newTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.newTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.newTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.newTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.RISING.fullName)) { - binding.risingTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.risingTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.risingTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.risingTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.TOP.fullName)) { - binding.topTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.topTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.topTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.topTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.CONTROVERSIAL.fullName)) { - binding.controversialTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.controversialTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.controversialTypeTextViewSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.controversialTypeTextViewSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } binding.hotTypeTextViewSortTypeBottomSheetFragment.setOnClickListener(view -> { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UserThingSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UserThingSortTypeBottomSheetFragment.java index 85c21fdd..e27334cc 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UserThingSortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/UserThingSortTypeBottomSheetFragment.java @@ -50,13 +50,13 @@ public class UserThingSortTypeBottomSheetFragment extends LandscapeExpandedRound String currentSortType = getArguments().getString(EXTRA_CURRENT_SORT_TYPE); if (currentSortType.equals(SortType.Type.NEW.fullName)) { - binding.newTypeTextViewUserThingSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.newTypeTextViewUserThingSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.newTypeTextViewUserThingSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.newTypeTextViewUserThingSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.HOT.fullName)) { - binding.hotTypeTextViewUserThingSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.hotTypeTextViewUserThingSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.hotTypeTextViewUserThingSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.hotTypeTextViewUserThingSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.TOP.fullName)) { - binding.topTypeTextViewUserThingSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.topTypeTextViewUserThingSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.topTypeTextViewUserThingSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.topTypeTextViewUserThingSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } else if (currentSortType.equals(SortType.Type.CONTROVERSIAL.fullName)) { - binding.controversialTypeTextViewUserThingSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.controversialTypeTextViewUserThingSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_round_check_circle_day_night_24dp), null); + binding.controversialTypeTextViewUserThingSortTypeBottomSheetFragment.setCompoundDrawablesRelativeWithIntrinsicBounds(binding.controversialTypeTextViewUserThingSortTypeBottomSheetFragment.getCompoundDrawablesRelative()[0], null, AppCompatResources.getDrawable(activity, R.drawable.ic_check_circle_day_night_24dp), null); } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/CommentsListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/CommentsListingFragment.java index 44ca9537..81db03be 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/CommentsListingFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/CommentsListingFragment.java @@ -338,18 +338,18 @@ public class CommentsListingFragment extends Fragment implements FragmentCommuni private void initializeSwipeActionDrawable() { if (swipeRightAction == SharedPreferencesUtils.SWIPE_ACITON_DOWNVOTE) { backgroundSwipeRight = new ColorDrawable(customThemeWrapper.getDownvoted()); - drawableSwipeRight = ResourcesCompat.getDrawable(mActivity.getResources(), R.drawable.ic_arrow_downward_black_24dp, null); + drawableSwipeRight = ResourcesCompat.getDrawable(mActivity.getResources(), R.drawable.ic_arrow_downward_day_night_24dp, null); } else { backgroundSwipeRight = new ColorDrawable(customThemeWrapper.getUpvoted()); - drawableSwipeRight = ResourcesCompat.getDrawable(mActivity.getResources(), R.drawable.ic_arrow_upward_black_24dp, null); + drawableSwipeRight = ResourcesCompat.getDrawable(mActivity.getResources(), R.drawable.ic_arrow_upward_day_night_24dp, null); } if (swipeLeftAction == SharedPreferencesUtils.SWIPE_ACITON_UPVOTE) { backgroundSwipeLeft = new ColorDrawable(customThemeWrapper.getUpvoted()); - drawableSwipeLeft = ResourcesCompat.getDrawable(mActivity.getResources(), R.drawable.ic_arrow_upward_black_24dp, null); + drawableSwipeLeft = ResourcesCompat.getDrawable(mActivity.getResources(), R.drawable.ic_arrow_upward_day_night_24dp, null); } else { backgroundSwipeLeft = new ColorDrawable(customThemeWrapper.getDownvoted()); - drawableSwipeLeft = ResourcesCompat.getDrawable(mActivity.getResources(), R.drawable.ic_arrow_downward_black_24dp, null); + drawableSwipeLeft = ResourcesCompat.getDrawable(mActivity.getResources(), R.drawable.ic_arrow_downward_day_night_24dp, null); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java index 478a3e56..eb47e9ba 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/HistoryPostFragment.java @@ -682,18 +682,18 @@ public class HistoryPostFragment extends Fragment implements FragmentCommunicato private void initializeSwipeActionDrawable() { if (swipeRightAction == SharedPreferencesUtils.SWIPE_ACITON_DOWNVOTE) { backgroundSwipeRight = new ColorDrawable(mCustomThemeWrapper.getDownvoted()); - drawableSwipeRight = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_downward_black_24dp, null); + drawableSwipeRight = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_downward_day_night_24dp, null); } else { backgroundSwipeRight = new ColorDrawable(mCustomThemeWrapper.getUpvoted()); - drawableSwipeRight = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_upward_black_24dp, null); + drawableSwipeRight = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_upward_day_night_24dp, null); } if (swipeLeftAction == SharedPreferencesUtils.SWIPE_ACITON_UPVOTE) { backgroundSwipeLeft = new ColorDrawable(mCustomThemeWrapper.getUpvoted()); - drawableSwipeLeft = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_upward_black_24dp, null); + drawableSwipeLeft = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_upward_day_night_24dp, null); } else { backgroundSwipeLeft = new ColorDrawable(mCustomThemeWrapper.getDownvoted()); - drawableSwipeLeft = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_downward_black_24dp, null); + drawableSwipeLeft = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_downward_day_night_24dp, null); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java index c61fba65..68131e45 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java @@ -1387,18 +1387,18 @@ public class PostFragment extends Fragment implements FragmentCommunicator { private void initializeSwipeActionDrawable() { if (swipeRightAction == SharedPreferencesUtils.SWIPE_ACITON_DOWNVOTE) { backgroundSwipeRight = new ColorDrawable(mCustomThemeWrapper.getDownvoted()); - drawableSwipeRight = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_downward_black_24dp, null); + drawableSwipeRight = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_downward_day_night_24dp, null); } else { backgroundSwipeRight = new ColorDrawable(mCustomThemeWrapper.getUpvoted()); - drawableSwipeRight = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_upward_black_24dp, null); + drawableSwipeRight = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_upward_day_night_24dp, null); } if (swipeLeftAction == SharedPreferencesUtils.SWIPE_ACITON_UPVOTE) { backgroundSwipeLeft = new ColorDrawable(mCustomThemeWrapper.getUpvoted()); - drawableSwipeLeft = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_upward_black_24dp, null); + drawableSwipeLeft = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_upward_day_night_24dp, null); } else { backgroundSwipeLeft = new ColorDrawable(mCustomThemeWrapper.getDownvoted()); - drawableSwipeLeft = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_downward_black_24dp, null); + drawableSwipeLeft = ResourcesCompat.getDrawable(activity.getResources(), R.drawable.ic_arrow_downward_day_night_24dp, null); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java index cdcfdf95..b9826f11 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java @@ -705,18 +705,18 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic private void initializeSwipeActionDrawable() { if (swipeRightAction == SharedPreferencesUtils.SWIPE_ACITON_DOWNVOTE) { backgroundSwipeRight = new ColorDrawable(mCustomThemeWrapper.getDownvoted()); - drawableSwipeRight = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_arrow_downward_black_24dp, null); + drawableSwipeRight = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_arrow_downward_day_night_24dp, null); } else { backgroundSwipeRight = new ColorDrawable(mCustomThemeWrapper.getUpvoted()); - drawableSwipeRight = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_arrow_upward_black_24dp, null); + drawableSwipeRight = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_arrow_upward_day_night_24dp, null); } if (swipeLeftAction == SharedPreferencesUtils.SWIPE_ACITON_UPVOTE) { backgroundSwipeLeft = new ColorDrawable(mCustomThemeWrapper.getUpvoted()); - drawableSwipeLeft = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_arrow_upward_black_24dp, null); + drawableSwipeLeft = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_arrow_upward_day_night_24dp, null); } else { backgroundSwipeLeft = new ColorDrawable(mCustomThemeWrapper.getDownvoted()); - drawableSwipeLeft = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_arrow_downward_black_24dp, null); + drawableSwipeLeft = ResourcesCompat.getDrawable(getResources(), R.drawable.ic_arrow_downward_day_night_24dp, null); } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeBottomAppBarFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeBottomAppBarFragment.java index 6bfd4af6..0c808599 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeBottomAppBarFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeBottomAppBarFragment.java @@ -318,7 +318,7 @@ public class CustomizeBottomAppBarFragment extends Fragment { int secondaryTextColor = activity.customThemeWrapper.getSecondaryTextColor(); int accentColor = activity.customThemeWrapper.getColorAccent(); binding.infoTextViewCustomizeBottomAppBarFragment.setTextColor(secondaryTextColor); - Drawable infoDrawable = Utils.getTintedDrawable(activity, R.drawable.ic_info_preference_24dp, activity.customThemeWrapper.getPrimaryIconColor()); + Drawable infoDrawable = Utils.getTintedDrawable(activity, R.drawable.ic_info_preference_day_night_24dp, activity.customThemeWrapper.getPrimaryIconColor()); binding.infoTextViewCustomizeBottomAppBarFragment.setCompoundDrawablesWithIntrinsicBounds(infoDrawable, null, null, null); binding.mainActivityGroupSummaryCustomizeBottomAppBarFragment.setTextColor(accentColor); binding.mainActivityOptionCountTitleTextViewCustomizeBottomAppBarFragment.setTextColor(primaryTextColor); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeMainPageTabsFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeMainPageTabsFragment.java index d352a5e7..525defaf 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeMainPageTabsFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeMainPageTabsFragment.java @@ -401,7 +401,7 @@ public class CustomizeMainPageTabsFragment extends Fragment { int colorAccent = activity.customThemeWrapper.getColorAccent(); int primaryIconColor = activity.customThemeWrapper.getPrimaryIconColor(); binding.infoTextViewCustomizeMainPageTabsFragment.setTextColor(secondaryTextColor); - Drawable infoDrawable = Utils.getTintedDrawable(activity, R.drawable.ic_info_preference_24dp, secondaryTextColor); + Drawable infoDrawable = Utils.getTintedDrawable(activity, R.drawable.ic_info_preference_day_night_24dp, secondaryTextColor); binding.infoTextViewCustomizeMainPageTabsFragment.setCompoundDrawablesWithIntrinsicBounds(infoDrawable, null, null, null); binding.tabCountTitleTextViewCustomizeMainPageTabsFragment.setTextColor(primaryTextColor); binding.tabCountTextViewCustomizeMainPageTabsFragment.setTextColor(secondaryTextColor); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java index 6cebdc41..df14c496 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java @@ -156,7 +156,7 @@ public class NsfwAndSpoilerFragment extends Fragment { private void applyCustomTheme() { int primaryTextColor = activity.customThemeWrapper.getPrimaryTextColor(); - binding.enableNsfwTextViewNsfwAndSpoilerFragment.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(activity, R.drawable.ic_nsfw_on_24dp, activity.customThemeWrapper.getPrimaryIconColor()), null, null, null); + binding.enableNsfwTextViewNsfwAndSpoilerFragment.setCompoundDrawablesWithIntrinsicBounds(Utils.getTintedDrawable(activity, R.drawable.ic_nsfw_on_day_night_24dp, activity.customThemeWrapper.getPrimaryIconColor()), null, null, null); binding.enableNsfwTextViewNsfwAndSpoilerFragment.setTextColor(primaryTextColor); binding.blurNsfwTextViewNsfwAndSpoilerFragment.setTextColor(primaryTextColor); binding.doNotBlurNsfwTextViewNsfwAndSpoilerFragment.setTextColor(primaryTextColor); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java index 123679a5..0268a7ca 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java @@ -92,7 +92,7 @@ public class PostHistoryFragment extends Fragment { private void applyCustomTheme() { binding.infoTextViewPostHistoryFragment.setTextColor(activity.customThemeWrapper.getSecondaryTextColor()); - Drawable infoDrawable = Utils.getTintedDrawable(activity, R.drawable.ic_info_preference_24dp, activity.customThemeWrapper.getPrimaryIconColor()); + Drawable infoDrawable = Utils.getTintedDrawable(activity, R.drawable.ic_info_preference_day_night_24dp, activity.customThemeWrapper.getPrimaryIconColor()); binding.infoTextViewPostHistoryFragment.setCompoundDrawablesWithIntrinsicBounds(infoDrawable, null, null, null); int primaryTextColor = activity.customThemeWrapper.getPrimaryTextColor(); binding.markPostsAsReadTextViewPostHistoryFragment.setTextColor(primaryTextColor); -- cgit v1.2.3