mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01:00
Move all bottom sheet fragments to package BottomSheetFragment. Add a UrlMenuBottomSheetFragment for future use.
This commit is contained in:
parent
b8e4ce6e1d
commit
0dbb6a745f
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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<RecyclerView.ViewHolder> {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.content.ActivityNotFoundException;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
@ -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;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package ml.docilealligator.infinityforreddit.Fragment;
|
||||
package ml.docilealligator.infinityforreddit.BottomSheetFragment;
|
||||
|
||||
|
||||
import android.app.Activity;
|
9
app/src/main/res/drawable-night/ic_open_link_24dp.xml
Normal file
9
app/src/main/res/drawable-night/ic_open_link_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"
|
||||
android:fillColor="#FFFFFF"/>
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_open_link_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_open_link_24dp.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"
|
||||
android:fillColor="#000000"/>
|
||||
</vector>
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:overScrollMode="never"
|
||||
tools:context=".Fragment.SortTimeBottomSheetFragment">
|
||||
tools:context=".BottomSheetFragment.CopyTextBottomSheetFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -4,7 +4,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:overScrollMode="never"
|
||||
tools:context=".Fragment.PostCommentSortTypeBottomSheetFragment">
|
||||
tools:context=".BottomSheetFragment.PostCommentSortTypeBottomSheetFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:overScrollMode="never"
|
||||
tools:context=".Fragment.PostLayoutBottomSheetFragment">
|
||||
tools:context=".BottomSheetFragment.PostLayoutBottomSheetFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -5,7 +5,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:overScrollMode="never"
|
||||
tools:context=".Fragment.SortTimeBottomSheetFragment">
|
||||
tools:context=".BottomSheetFragment.SortTimeBottomSheetFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
68
app/src/main/res/layout/fragment_url_menu_bottom_sheet.xml
Normal file
68
app/src/main/res/layout/fragment_url_menu_bottom_sheet.xml
Normal file
@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:overScrollMode="never"
|
||||
tools:context=".BottomSheetFragment.UrlMenuBottomSheetFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/open_link_text_view_url_menu_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/copy_raw_text"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:drawableStart="@drawable/ic_open_link_24dp"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/copy_link_text_view_url_menu_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/copy_markdown"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:drawableStart="@drawable/ic_copy_24dp"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_link_text_view_url_menu_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/copy_all_raw_text"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:drawableStart="@drawable/ic_share_24dp"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
@ -754,5 +754,7 @@
|
||||
<string name="downloading_reddit_video_failed_cannot_save_audio">Download failed: cannot save audio to cache directory</string>
|
||||
<string name="downloading_reddit_video_failed_cannot_mux">Download failed: cannot mux video and audio</string>
|
||||
<string name="downloading_reddit_video_failed_cannot_save_mux_video">Download failed: cannot save the video to public directory</string>
|
||||
<!-- TODO: Remove or change this placeholder text -->
|
||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
||||
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user