From 0dbb6a745f519986e7033cd8a60dd0c055a559a4 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Mon, 8 Jun 2020 21:11:01 +0800 Subject: [PATCH] Move all bottom sheet fragments to package BottomSheetFragment. Add a UrlMenuBottomSheetFragment for future use. --- .../Activity/AccountPostsActivity.java | 2 +- .../Activity/CommentActivity.java | 2 +- .../Activity/CustomThemeListingActivity.java | 4 +- .../Activity/FilteredThingActivity.java | 10 +-- .../Activity/MainActivity.java | 8 +- .../Activity/PostImageActivity.java | 2 +- .../Activity/PostLinkActivity.java | 2 +- .../Activity/PostTextActivity.java | 2 +- .../Activity/PostVideoActivity.java | 2 +- .../Activity/SearchResultActivity.java | 8 +- .../ViewMultiRedditDetailActivity.java | 6 +- .../Activity/ViewPostDetailActivity.java | 4 +- .../Activity/ViewSubredditDetailActivity.java | 8 +- .../Activity/ViewUserDetailActivity.java | 6 +- .../CommentAndPostRecyclerViewAdapter.java | 8 +- .../CommentsListingRecyclerViewAdapter.java | 2 +- ...CustomThemeListingRecyclerViewAdapter.java | 2 +- ...MultiRedditListingRecyclerViewAdapter.java | 2 +- .../Adapter/PostRecyclerViewAdapter.java | 2 +- .../infinityforreddit/AppComponent.java | 2 +- .../CommentMoreBottomSheetFragment.java | 2 +- .../CopyTextBottomSheetFragment.java | 2 +- .../CreateThemeBottomSheetFragment.java | 2 +- ...CustomThemeOptionsBottomSheetFragment.java | 2 +- .../FlairBottomSheetFragment.java | 2 +- ...MultiRedditOptionsBottomSheetFragment.java | 2 +- ...ostCommentSortTypeBottomSheetFragment.java | 2 +- .../PostLayoutBottomSheetFragment.java | 2 +- .../PostTypeBottomSheetFragment.java | 2 +- ...SearchPostSortTypeBottomSheetFragment.java | 2 +- ...dSubredditSortTypeBottomSheetFragment.java | 2 +- .../ShareLinkBottomSheetFragment.java | 2 +- .../SortTimeBottomSheetFragment.java | 2 +- .../SortTypeBottomSheetFragment.java | 2 +- .../UrlMenuBottomSheetFragment.java | 87 +++++++++++++++++++ .../UserThingSortTypeBottomSheetFragment.java | 2 +- .../res/drawable-night/ic_open_link_24dp.xml | 9 ++ .../main/res/drawable/ic_open_link_24dp.xml | 9 ++ .../fragment_copy_text_bottom_sheet.xml | 2 +- ...nt_post_comment_sort_type_bottom_sheet.xml | 2 +- .../fragment_post_layot_bottom_sheet.xml | 2 +- .../fragment_sort_time_bottom_sheet.xml | 2 +- .../layout/fragment_url_menu_bottom_sheet.xml | 68 +++++++++++++++ app/src/main/res/values/strings.xml | 2 + 44 files changed, 236 insertions(+), 61 deletions(-) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/CommentMoreBottomSheetFragment.java (98%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/CopyTextBottomSheetFragment.java (98%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/CreateThemeBottomSheetFragment.java (98%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/CustomThemeOptionsBottomSheetFragment.java (98%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/FlairBottomSheetFragment.java (98%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/MultiRedditOptionsBottomSheetFragment.java (97%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/PostCommentSortTypeBottomSheetFragment.java (98%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/PostLayoutBottomSheetFragment.java (96%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/PostTypeBottomSheetFragment.java (97%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/SearchPostSortTypeBottomSheetFragment.java (98%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/SearchUserAndSubredditSortTypeBottomSheetFragment.java (97%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/ShareLinkBottomSheetFragment.java (98%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/SortTimeBottomSheetFragment.java (98%) rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/SortTypeBottomSheetFragment.java (98%) create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/UrlMenuBottomSheetFragment.java rename app/src/main/java/ml/docilealligator/infinityforreddit/{Fragment => BottomSheetFragment}/UserThingSortTypeBottomSheetFragment.java (97%) create mode 100644 app/src/main/res/drawable-night/ic_open_link_24dp.xml create mode 100644 app/src/main/res/drawable/ic_open_link_24dp.xml create mode 100644 app/src/main/res/layout/fragment_url_menu_bottom_sheet.xml diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/AccountPostsActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/AccountPostsActivity.java index 81cb85c7..1e6ef259 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/AccountPostsActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/AccountPostsActivity.java @@ -31,7 +31,7 @@ import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.ChangeNSFWEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Fragment.PostFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostLayoutBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostLayoutBottomSheetFragment; import ml.docilealligator.infinityforreddit.FragmentCommunicator; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.Post.PostDataSource; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentActivity.java index b1ea2f30..d9c07e88 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentActivity.java @@ -51,7 +51,7 @@ import ml.docilealligator.infinityforreddit.AsyncTask.GetCurrentAccountAsyncTask import ml.docilealligator.infinityforreddit.CommentData; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; -import ml.docilealligator.infinityforreddit.Fragment.CopyTextBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.CopyTextBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CustomThemeListingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CustomThemeListingActivity.java index 0a8acf90..42ee73c0 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CustomThemeListingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CustomThemeListingActivity.java @@ -42,8 +42,8 @@ import ml.docilealligator.infinityforreddit.CustomTheme.CustomTheme; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeViewModel; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.RecreateActivityEvent; -import ml.docilealligator.infinityforreddit.Fragment.CreateThemeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.CustomThemeOptionsBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.CreateThemeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.CustomThemeOptionsBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/FilteredThingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/FilteredThingActivity.java index 01c74de3..c850f2d3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/FilteredThingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/FilteredThingActivity.java @@ -30,11 +30,11 @@ import ml.docilealligator.infinityforreddit.AsyncTask.GetCurrentAccountAsyncTask import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Fragment.PostFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostLayoutBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SearchPostSortTypeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTimeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTypeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.UserThingSortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostLayoutBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SearchPostSortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTimeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.UserThingSortTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.FragmentCommunicator; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.Post.Post; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java index 08596718..14c12d2e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java @@ -73,10 +73,10 @@ import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.FetchMyInfo; import ml.docilealligator.infinityforreddit.FetchSubscribedThing; import ml.docilealligator.infinityforreddit.Fragment.PostFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostLayoutBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostTypeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTimeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostLayoutBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTimeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.ParseAndSaveAccountInfo; import ml.docilealligator.infinityforreddit.Post.PostDataSource; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostImageActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostImageActivity.java index 12d06132..0bfbc20e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostImageActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostImageActivity.java @@ -51,7 +51,7 @@ import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.SubmitImagePostEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Flair; -import ml.docilealligator.infinityforreddit.Fragment.FlairBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java index f59e807b..5edb7c8f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java @@ -41,7 +41,7 @@ import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.SubmitTextOrLinkPostEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Flair; -import ml.docilealligator.infinityforreddit.Fragment.FlairBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java index a448759f..29b0256f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java @@ -41,7 +41,7 @@ import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.SubmitTextOrLinkPostEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Flair; -import ml.docilealligator.infinityforreddit.Fragment.FlairBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java index dc590b4e..386032a7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java @@ -53,7 +53,7 @@ import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.SubmitVideoPostEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Flair; -import ml.docilealligator.infinityforreddit.Fragment.FlairBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java index 3bda986c..764c065c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/SearchResultActivity.java @@ -36,10 +36,10 @@ import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.ChangeNSFWEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.Fragment.PostFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostLayoutBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SearchPostSortTypeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SearchUserAndSubredditSortTypeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTimeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostLayoutBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SearchPostSortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SearchUserAndSubredditSortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTimeBottomSheetFragment; import ml.docilealligator.infinityforreddit.Fragment.SubredditListingFragment; import ml.docilealligator.infinityforreddit.Fragment.UserListingFragment; import ml.docilealligator.infinityforreddit.FragmentCommunicator; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java index da94b78e..a87a200a 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMultiRedditDetailActivity.java @@ -31,9 +31,9 @@ import ml.docilealligator.infinityforreddit.AsyncTask.GetCurrentAccountAsyncTask import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.Event.RefreshMultiRedditsEvent; import ml.docilealligator.infinityforreddit.Fragment.PostFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostLayoutBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTimeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostLayoutBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTimeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.FragmentCommunicator; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.MultiReddit.DeleteMultiReddit; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java index 247bd12e..51a5beaa 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java @@ -72,8 +72,8 @@ import ml.docilealligator.infinityforreddit.Event.PostUpdateEventToPostList; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.FetchComment; import ml.docilealligator.infinityforreddit.Flair; -import ml.docilealligator.infinityforreddit.Fragment.FlairBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostCommentSortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostCommentSortTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.ParseComment; import ml.docilealligator.infinityforreddit.Post.FetchPost; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java index 19b34354..0ec10e46 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java @@ -62,11 +62,11 @@ import ml.docilealligator.infinityforreddit.Event.GoBackToMainPageEvent; import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.FetchSubredditData; import ml.docilealligator.infinityforreddit.Fragment.PostFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostLayoutBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostLayoutBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.Fragment.SidebarFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTimeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTimeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.FragmentCommunicator; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.Post.PostDataSource; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java index 36f3c203..a72c7389 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewUserDetailActivity.java @@ -61,9 +61,9 @@ import ml.docilealligator.infinityforreddit.Event.SwitchAccountEvent; import ml.docilealligator.infinityforreddit.FetchUserData; import ml.docilealligator.infinityforreddit.Fragment.CommentsListingFragment; import ml.docilealligator.infinityforreddit.Fragment.PostFragment; -import ml.docilealligator.infinityforreddit.Fragment.PostLayoutBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.SortTimeBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.UserThingSortTypeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostLayoutBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTimeBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.UserThingSortTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.FragmentCommunicator; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.Post.PostDataSource; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java index 005da2f0..c4d65766 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java @@ -89,21 +89,21 @@ import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity; import ml.docilealligator.infinityforreddit.Activity.ViewVideoActivity; import ml.docilealligator.infinityforreddit.AsyncTask.LoadSubredditIconAsyncTask; import ml.docilealligator.infinityforreddit.AsyncTask.LoadUserDataAsyncTask; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.CommentMoreBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.CopyTextBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.ShareLinkBottomSheetFragment; import ml.docilealligator.infinityforreddit.CommentData; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.CustomView.AspectRatioGifImageView; import ml.docilealligator.infinityforreddit.CustomView.MarkwonLinearLayoutManager; import ml.docilealligator.infinityforreddit.FetchComment; -import ml.docilealligator.infinityforreddit.Fragment.CommentMoreBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.CopyTextBottomSheetFragment; -import ml.docilealligator.infinityforreddit.Fragment.ShareLinkBottomSheetFragment; import ml.docilealligator.infinityforreddit.Post.Post; import ml.docilealligator.infinityforreddit.Post.PostDataSource; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.SaveThing; -import ml.docilealligator.infinityforreddit.Utils.GlideImageGetter; import ml.docilealligator.infinityforreddit.Utils.APIUtils; +import ml.docilealligator.infinityforreddit.Utils.GlideImageGetter; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.Utils; import ml.docilealligator.infinityforreddit.VoteThing; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentsListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentsListingRecyclerViewAdapter.java index 3c32b201..0c29ae47 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentsListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentsListingRecyclerViewAdapter.java @@ -39,7 +39,7 @@ import ml.docilealligator.infinityforreddit.Activity.ViewSubredditDetailActivity import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity; import ml.docilealligator.infinityforreddit.CommentData; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; -import ml.docilealligator.infinityforreddit.Fragment.CommentMoreBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.CommentMoreBottomSheetFragment; import ml.docilealligator.infinityforreddit.NetworkState; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.SaveThing; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomThemeListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomThemeListingRecyclerViewAdapter.java index b3cbb38c..c4ea3963 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomThemeListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomThemeListingRecyclerViewAdapter.java @@ -21,7 +21,7 @@ import butterknife.ButterKnife; import ml.docilealligator.infinityforreddit.Activity.CustomThemeListingActivity; import ml.docilealligator.infinityforreddit.Activity.CustomizeThemeActivity; import ml.docilealligator.infinityforreddit.CustomTheme.CustomTheme; -import ml.docilealligator.infinityforreddit.Fragment.CustomThemeOptionsBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.CustomThemeOptionsBottomSheetFragment; import ml.docilealligator.infinityforreddit.R; public class CustomThemeListingRecyclerViewAdapter extends RecyclerView.Adapter { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MultiRedditListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MultiRedditListingRecyclerViewAdapter.java index 7ededb6d..4be79e91 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MultiRedditListingRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/MultiRedditListingRecyclerViewAdapter.java @@ -25,7 +25,7 @@ import jp.wasabeef.glide.transformations.RoundedCornersTransformation; import me.zhanghai.android.fastscroll.PopupTextProvider; import ml.docilealligator.infinityforreddit.Activity.ViewMultiRedditDetailActivity; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; -import ml.docilealligator.infinityforreddit.Fragment.MultiRedditOptionsBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.MultiRedditOptionsBottomSheetFragment; import ml.docilealligator.infinityforreddit.MultiReddit.FavoriteMultiReddit; import ml.docilealligator.infinityforreddit.MultiReddit.MultiReddit; import ml.docilealligator.infinityforreddit.R; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java index 07009344..7aaaa391 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/PostRecyclerViewAdapter.java @@ -75,7 +75,7 @@ import ml.docilealligator.infinityforreddit.AsyncTask.LoadUserDataAsyncTask; import ml.docilealligator.infinityforreddit.CustomTheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.CustomView.AspectRatioGifImageView; import ml.docilealligator.infinityforreddit.Event.PostUpdateEventToDetailActivity; -import ml.docilealligator.infinityforreddit.Fragment.ShareLinkBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.ShareLinkBottomSheetFragment; import ml.docilealligator.infinityforreddit.NetworkState; import ml.docilealligator.infinityforreddit.Post.Post; import ml.docilealligator.infinityforreddit.Post.PostDataSource; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java b/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java index f36c1932..651b09b7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/AppComponent.java @@ -43,7 +43,7 @@ import ml.docilealligator.infinityforreddit.Activity.ViewSubredditDetailActivity import ml.docilealligator.infinityforreddit.Activity.ViewUserDetailActivity; import ml.docilealligator.infinityforreddit.Activity.ViewVideoActivity; import ml.docilealligator.infinityforreddit.Fragment.CommentsListingFragment; -import ml.docilealligator.infinityforreddit.Fragment.FlairBottomSheetFragment; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FlairBottomSheetFragment; import ml.docilealligator.infinityforreddit.Fragment.FollowedUsersListingFragment; import ml.docilealligator.infinityforreddit.Fragment.MultiRedditListingFragment; import ml.docilealligator.infinityforreddit.Fragment.PostFragment; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentMoreBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CommentMoreBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentMoreBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CommentMoreBottomSheetFragment.java index fd97f1d4..364096e6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CommentMoreBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CommentMoreBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.content.ActivityNotFoundException; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CopyTextBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CopyTextBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CopyTextBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CopyTextBottomSheetFragment.java index b0b6469d..83cb6569 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CopyTextBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CopyTextBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CreateThemeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CreateThemeBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CreateThemeBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CreateThemeBottomSheetFragment.java index d92286ae..111916d3 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CreateThemeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CreateThemeBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; import android.content.Context; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CustomThemeOptionsBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CustomThemeOptionsBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CustomThemeOptionsBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CustomThemeOptionsBottomSheetFragment.java index 5529a599..b9a17fef 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/CustomThemeOptionsBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/CustomThemeOptionsBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; import android.content.Context; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FlairBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/FlairBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FlairBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/FlairBottomSheetFragment.java index 78b3c665..1856eb68 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FlairBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/FlairBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/MultiRedditOptionsBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/MultiRedditOptionsBottomSheetFragment.java similarity index 97% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/MultiRedditOptionsBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/MultiRedditOptionsBottomSheetFragment.java index 3ac1c407..60b065ba 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/MultiRedditOptionsBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/MultiRedditOptionsBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.content.Context; import android.content.Intent; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostCommentSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostCommentSortTypeBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostCommentSortTypeBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostCommentSortTypeBottomSheetFragment.java index 2b78a220..da747efd 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostCommentSortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostCommentSortTypeBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostLayoutBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostLayoutBottomSheetFragment.java similarity index 96% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostLayoutBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostLayoutBottomSheetFragment.java index 10ee1ca2..c0873a14 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostLayoutBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostLayoutBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostTypeBottomSheetFragment.java similarity index 97% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostTypeBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostTypeBottomSheetFragment.java index abd528b7..1f40fc22 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostTypeBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchPostSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SearchPostSortTypeBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchPostSortTypeBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SearchPostSortTypeBottomSheetFragment.java index 9973b1af..12f97c9e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchPostSortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SearchPostSortTypeBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchUserAndSubredditSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SearchUserAndSubredditSortTypeBottomSheetFragment.java similarity index 97% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchUserAndSubredditSortTypeBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SearchUserAndSubredditSortTypeBottomSheetFragment.java index bd40b263..0fad6d7b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SearchUserAndSubredditSortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SearchUserAndSubredditSortTypeBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ShareLinkBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/ShareLinkBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ShareLinkBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/ShareLinkBottomSheetFragment.java index 4a2ed929..1214dbc8 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/ShareLinkBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/ShareLinkBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SortTimeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SortTimeBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SortTimeBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SortTimeBottomSheetFragment.java index 10cfdde7..f2f1da4d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SortTimeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SortTimeBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SortTypeBottomSheetFragment.java similarity index 98% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SortTypeBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SortTypeBottomSheetFragment.java index ba03d93c..ee5ba39f 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/SortTypeBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/UrlMenuBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/UrlMenuBottomSheetFragment.java new file mode 100644 index 00000000..f2812232 --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/UrlMenuBottomSheetFragment.java @@ -0,0 +1,87 @@ +package ml.docilealligator.infinityforreddit.BottomSheetFragment; + +import android.app.Activity; +import android.content.ClipData; +import android.content.ClipboardManager; +import android.content.Context; +import android.content.Intent; +import android.net.Uri; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; +import android.widget.Toast; + +import androidx.annotation.NonNull; + +import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment; + +import butterknife.BindView; +import butterknife.ButterKnife; +import ml.docilealligator.infinityforreddit.Activity.LinkResolverActivity; +import ml.docilealligator.infinityforreddit.R; + +public class UrlMenuBottomSheetFragment extends RoundedBottomSheetDialogFragment { + + public static final String EXTRA_URL = "EU"; + @BindView(R.id.open_link_text_view_url_menu_bottom_sheet_fragment) + TextView openLinkTextView; + @BindView(R.id.copy_link_text_view_url_menu_bottom_sheet_fragment) + TextView copyLinkTextView; + @BindView(R.id.share_link_text_view_url_menu_bottom_sheet_fragment) + TextView shareLinkTextView; + private Activity activity; + + public UrlMenuBottomSheetFragment() { + // Required empty public constructor + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + View rootView = inflater.inflate(R.layout.fragment_url_menu_bottom_sheet, container, false); + ButterKnife.bind(this, rootView); + + String url = getArguments().getString(EXTRA_URL); + + openLinkTextView.setOnClickListener(view -> { + Intent intent = new Intent(activity, LinkResolverActivity.class); + intent.setData(Uri.parse(url)); + activity.startActivity(intent); + dismiss(); + }); + + copyLinkTextView.setOnClickListener(view -> { + ClipboardManager clipboard = (ClipboardManager) activity.getSystemService(Context.CLIPBOARD_SERVICE); + if (clipboard != null) { + ClipData clip = ClipData.newPlainText("simple text", url); + clipboard.setPrimaryClip(clip); + Toast.makeText(activity, R.string.copy_success, Toast.LENGTH_SHORT).show(); + } else { + Toast.makeText(activity, R.string.copy_link_failed, Toast.LENGTH_SHORT).show(); + } + dismiss(); + }); + + shareLinkTextView.setOnClickListener(view -> { + Intent intent = new Intent(Intent.ACTION_SEND); + intent.setType("text/plain"); + intent.putExtra(Intent.EXTRA_TEXT, url); + if (intent.resolveActivity(activity.getPackageManager()) != null) { + startActivity(intent); + } else { + Toast.makeText(activity, R.string.no_app, Toast.LENGTH_SHORT).show(); + } + dismiss(); + }); + + return rootView; + } + + @Override + public void onAttach(@NonNull Context context) { + super.onAttach(context); + activity = (Activity) context; + } +} \ No newline at end of file diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserThingSortTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/UserThingSortTypeBottomSheetFragment.java similarity index 97% rename from app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserThingSortTypeBottomSheetFragment.java rename to app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/UserThingSortTypeBottomSheetFragment.java index 59e099c4..2d6b7cae 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserThingSortTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/UserThingSortTypeBottomSheetFragment.java @@ -1,4 +1,4 @@ -package ml.docilealligator.infinityforreddit.Fragment; +package ml.docilealligator.infinityforreddit.BottomSheetFragment; import android.app.Activity; diff --git a/app/src/main/res/drawable-night/ic_open_link_24dp.xml b/app/src/main/res/drawable-night/ic_open_link_24dp.xml new file mode 100644 index 00000000..db3c9198 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_open_link_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_open_link_24dp.xml b/app/src/main/res/drawable/ic_open_link_24dp.xml new file mode 100644 index 00000000..48468b54 --- /dev/null +++ b/app/src/main/res/drawable/ic_open_link_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml b/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml index 3d82d549..1e1e5394 100644 --- a/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml @@ -5,7 +5,7 @@ android:layout_height="wrap_content" android:paddingBottom="8dp" android:overScrollMode="never" - tools:context=".Fragment.SortTimeBottomSheetFragment"> + tools:context=".BottomSheetFragment.CopyTextBottomSheetFragment"> + tools:context=".BottomSheetFragment.PostCommentSortTypeBottomSheetFragment"> + tools:context=".BottomSheetFragment.PostLayoutBottomSheetFragment"> + tools:context=".BottomSheetFragment.SortTimeBottomSheetFragment"> + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 7f313913..bdd8df76 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -754,5 +754,7 @@ Download failed: cannot save audio to cache directory Download failed: cannot mux video and audio Download failed: cannot save the video to public directory + + Hello blank fragment