diff options
Diffstat (limited to '')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java | 26 | ||||
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java | 14 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_view_subreddit_detail.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/activity_view_user_detail.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/app_bar_main.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/layout/bottom_app_bar.xml (renamed from app/src/main/res/layout/bottom_app_bar_other_activities.xml) | 0 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 6 |
7 files changed, 47 insertions, 5 deletions
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 d1c32368..d5fb3823 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewUserDetailActivity.java @@ -106,8 +106,8 @@ import pl.droidsonroids.gif.GifImageView; import retrofit2.Retrofit; public class ViewUserDetailActivity extends BaseActivity implements SortTypeSelectionCallback, - PostLayoutBottomSheetFragment.PostLayoutSelectionCallback, ActivityToolbarInterface, - FABMoreOptionsBottomSheetFragment.FABOptionSelectionCallback, + PostTypeBottomSheetFragment.PostTypeSelectionCallback, PostLayoutBottomSheetFragment.PostLayoutSelectionCallback, + ActivityToolbarInterface, FABMoreOptionsBottomSheetFragment.FABOptionSelectionCallback, RandomBottomSheetFragment.RandomOptionSelectionCallback, MarkPostAsReadInterface { public static final String EXTRA_USER_NAME_KEY = "EUNK"; @@ -1241,6 +1241,28 @@ public class ViewUserDetailActivity extends BaseActivity implements SortTypeSele InsertReadPost.insertReadPost(mRedditDataRoomDatabase, mAccountName, post.getId()); } + @Override + public void postTypeSelected(int postType) { + Intent intent; + switch (postType) { + case PostTypeBottomSheetFragment.TYPE_TEXT: + intent = new Intent(this, PostTextActivity.class); + startActivity(intent); + break; + case PostTypeBottomSheetFragment.TYPE_LINK: + intent = new Intent(this, PostLinkActivity.class); + startActivity(intent); + break; + case PostTypeBottomSheetFragment.TYPE_IMAGE: + intent = new Intent(this, PostImageActivity.class); + startActivity(intent); + break; + case PostTypeBottomSheetFragment.TYPE_VIDEO: + intent = new Intent(this, PostVideoActivity.class); + startActivity(intent); + } + } + private static class InsertUserDataAsyncTask extends AsyncTask<Void, Void, Void> { private UserDao userDao; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java index 56ad8718..e61d87c9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java @@ -99,6 +99,16 @@ public class CustomThemeSettingsItem implements Parcelable { context.getString(R.string.theme_item_post_content_color_detail), customTheme.postContentColor)); customThemeSettingsItems.add(new CustomThemeSettingsItem( + context.getString(R.string.theme_item_read_post_title_color), + context.getString(R.string.theme_item_read_post_title_color_detail), + customTheme.readPostTitleColor + )); + customThemeSettingsItems.add(new CustomThemeSettingsItem( + context.getString(R.string.theme_item_read_post_content_color), + context.getString(R.string.theme_item_read_post_content_color_detail), + customTheme.readPostContentColor + )); + customThemeSettingsItems.add(new CustomThemeSettingsItem( context.getString(R.string.theme_item_comment_color), context.getString(R.string.theme_item_comment_color_detail), customTheme.commentColor)); @@ -131,6 +141,10 @@ public class CustomThemeSettingsItem implements Parcelable { context.getString(R.string.theme_item_card_view_background_color_detail), customTheme.cardViewBackgroundColor)); customThemeSettingsItems.add(new CustomThemeSettingsItem( + context.getString(R.string.theme_item_read_post_card_view_background_color), + context.getString(R.string.theme_item_read_post_card_view_background_color_detail), + customTheme.readPostCardViewBackgroundColor)); + customThemeSettingsItems.add(new CustomThemeSettingsItem( context.getString(R.string.theme_item_comment_background_color), context.getString(R.string.theme_item_comment_background_color_detail), customTheme.commentBackgroundColor)); diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml index ef26b762..fbaf0fab 100644 --- a/app/src/main/res/layout/activity_view_subreddit_detail.xml +++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml @@ -173,7 +173,7 @@ </com.google.android.material.appbar.AppBarLayout> <include - layout="@layout/bottom_app_bar_other_activities" + layout="@layout/bottom_app_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" /> diff --git a/app/src/main/res/layout/activity_view_user_detail.xml b/app/src/main/res/layout/activity_view_user_detail.xml index 3ace2e08..8cad86b9 100644 --- a/app/src/main/res/layout/activity_view_user_detail.xml +++ b/app/src/main/res/layout/activity_view_user_detail.xml @@ -140,7 +140,7 @@ </com.google.android.material.appbar.AppBarLayout> <include - layout="@layout/bottom_app_bar_other_activities" + layout="@layout/bottom_app_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" /> diff --git a/app/src/main/res/layout/app_bar_main.xml b/app/src/main/res/layout/app_bar_main.xml index c17ef9f7..85db79c9 100644 --- a/app/src/main/res/layout/app_bar_main.xml +++ b/app/src/main/res/layout/app_bar_main.xml @@ -52,7 +52,7 @@ app:layout_behavior="@string/appbar_scrolling_view_behavior" /> <include - layout="@layout/bottom_app_bar_other_activities" + layout="@layout/bottom_app_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" /> diff --git a/app/src/main/res/layout/bottom_app_bar_other_activities.xml b/app/src/main/res/layout/bottom_app_bar.xml index fa1d886f..fa1d886f 100644 --- a/app/src/main/res/layout/bottom_app_bar_other_activities.xml +++ b/app/src/main/res/layout/bottom_app_bar.xml diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2fe0623c..87b52482 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -630,6 +630,10 @@ <string name="theme_item_post_title_color_detail">Applied to: Post title</string> <string name="theme_item_post_content_color">Post Content Color</string> <string name="theme_item_post_content_color_detail">Applied to: Post content</string> + <string name="theme_item_read_post_title_color">Read Post Title Color</string> + <string name="theme_item_read_post_title_color_detail">Applied to: Read Post Title</string> + <string name="theme_item_read_post_content_color">Read Post Content Color</string> + <string name="theme_item_read_post_content_color_detail">Applied to: Read Post Content</string> <string name="theme_item_comment_color">Comment Color</string> <string name="theme_item_comment_color_detail">Applied to: Comment</string> <string name="theme_item_button_text_color">Button Text Color</string> @@ -646,6 +650,8 @@ <string name="theme_item_background_color_detail">Applied to: Background of every page and navigation drawer</string> <string name="theme_item_card_view_background_color">Card View Background Color</string> <string name="theme_item_card_view_background_color_detail">Applied to: Post background and message background</string> + <string name="theme_item_read_post_card_view_background_color">Read Post Card View Background Color</string> + <string name="theme_item_read_post_card_view_background_color_detail">Applied to: Read Post background</string> <string name="theme_item_comment_background_color">Comment Background Color</string> <string name="theme_item_comment_background_color_detail">Applied to: Comment background</string> <string name="theme_item_fully_collapsed_comment_background_color">Fully-Collapsed Comment Background Color</string> |