mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01:00
Maximize bottom sheet fragments.
This commit is contained in:
parent
ff69387221
commit
68e94fa928
@ -18,8 +18,6 @@ import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
@ -31,12 +29,13 @@ import ml.docilealligator.infinityforreddit.activities.ReportActivity;
|
||||
import ml.docilealligator.infinityforreddit.activities.ViewPostDetailActivity;
|
||||
import ml.docilealligator.infinityforreddit.activities.ViewUserDetailActivity;
|
||||
import ml.docilealligator.infinityforreddit.comment.Comment;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class CommentMoreBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_COMMENT = "ECF";
|
||||
public static final String EXTRA_ACCESS_TOKEN = "EAT";
|
||||
|
@ -15,17 +15,17 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class CopyTextBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class CopyTextBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
public static final String EXTRA_RAW_TEXT = "ERT";
|
||||
public static final String EXTRA_MARKDOWN = "EM";
|
||||
|
||||
|
@ -12,17 +12,16 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.activities.CustomizeThemeActivity;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.activities.CustomizeThemeActivity;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class CreateThemeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class CreateThemeBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
@BindView(R.id.import_theme_text_view_create_theme_bottom_sheet_fragment)
|
||||
TextView importTextView;
|
||||
|
@ -13,17 +13,16 @@ import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.activities.CustomizeThemeActivity;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.activities.CustomizeThemeActivity;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class CustomThemeOptionsBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class CustomThemeOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_THEME_NAME = "ETN";
|
||||
@BindView(R.id.theme_name_text_view_custom_theme_options_bottom_sheet_fragment)
|
||||
|
@ -9,13 +9,12 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
public class FABMoreOptionsBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class FABMoreOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_ANONYMOUS_MODE = "EAM";
|
||||
public static final int FAB_OPTION_SUBMIT_POST = 0;
|
||||
|
@ -9,13 +9,12 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
public class FilteredThingFABMoreOptionsBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class FilteredThingFABMoreOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final int FAB_OPTION_FILTER = 0;
|
||||
public static final int FAB_OPTION_HIDE_READ_POSTS = 1;
|
||||
|
@ -14,6 +14,7 @@ import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
@ -25,12 +26,12 @@ import javax.inject.Named;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.adapters.FlairBottomSheetRecyclerViewAdapter;
|
||||
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
|
||||
import ml.docilealligator.infinityforreddit.FetchFlairs;
|
||||
import ml.docilealligator.infinityforreddit.Flair;
|
||||
import ml.docilealligator.infinityforreddit.Infinity;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.adapters.FlairBottomSheetRecyclerViewAdapter;
|
||||
import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper;
|
||||
import ml.docilealligator.infinityforreddit.events.FlairSelectedEvent;
|
||||
import retrofit2.Retrofit;
|
||||
|
||||
@ -121,8 +122,12 @@ public class FlairBottomSheetFragment extends BottomSheetDialogFragment {
|
||||
});
|
||||
}
|
||||
|
||||
public interface FlairSelectionCallback {
|
||||
void flairSelected(Flair flair);
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
View parentView = (View) requireView().getParent();
|
||||
BottomSheetBehavior.from(parentView).setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
BottomSheetBehavior.from(parentView).setSkipCollapsed(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -130,4 +135,8 @@ public class FlairBottomSheetFragment extends BottomSheetDialogFragment {
|
||||
super.onAttach(context);
|
||||
mActivity = (Activity) context;
|
||||
}
|
||||
|
||||
public interface FlairSelectionCallback {
|
||||
void flairSelected(Flair flair);
|
||||
}
|
||||
}
|
||||
|
@ -14,19 +14,18 @@ import android.widget.Toast;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.activities.EditMultiRedditActivity;
|
||||
import ml.docilealligator.infinityforreddit.activities.SubscribedThingListingActivity;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
import ml.docilealligator.infinityforreddit.multireddit.MultiReddit;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class MultiRedditOptionsBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class MultiRedditOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_MULTI_REDDIT = "EMR";
|
||||
|
||||
|
@ -9,15 +9,14 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.activities.PostFilterUsageListingActivity;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
import ml.docilealligator.infinityforreddit.postfilter.PostFilterUsage;
|
||||
|
||||
public class NewPostFilterUsageBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class NewPostFilterUsageBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
@BindView(R.id.home_text_view_new_post_filter_usage_bottom_sheet_fragment)
|
||||
TextView homeTextView;
|
||||
|
@ -14,18 +14,17 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.SortType;
|
||||
import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class PostCommentSortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class PostCommentSortTypeBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
@BindView(R.id.best_type_text_view_post_comment_sort_type_bottom_sheet_fragment)
|
||||
TextView bestTypeTextView;
|
||||
|
@ -9,15 +9,14 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.activities.PostFilterPreferenceActivity;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
import ml.docilealligator.infinityforreddit.postfilter.PostFilter;
|
||||
|
||||
public class PostFilterOptionsBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class PostFilterOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
@BindView(R.id.edit_text_view_post_filter_options_bottom_sheet_fragment)
|
||||
TextView editTextView;
|
||||
|
@ -9,15 +9,14 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.activities.PostFilterUsageListingActivity;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
import ml.docilealligator.infinityforreddit.postfilter.PostFilterUsage;
|
||||
|
||||
public class PostFilterUsageOptionsBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class PostFilterUsageOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_POST_FILTER_USAGE = "EPFU";
|
||||
|
||||
|
@ -12,17 +12,16 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
import ml.docilealligator.infinityforreddit.utils.SharedPreferencesUtils;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class PostLayoutBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class PostLayoutBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
@BindView(R.id.card_layout_text_view_post_layout_bottom_sheet_fragment)
|
||||
TextView cardLayoutTextView;
|
||||
|
@ -14,17 +14,16 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class PostTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class PostTypeBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final int TYPE_TEXT = 0;
|
||||
public static final int TYPE_LINK = 1;
|
||||
|
@ -9,13 +9,12 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
public class RandomBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class RandomBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_IS_NSFW = "EIN";
|
||||
public static final int RANDOM_SUBREDDIT = 0;
|
||||
|
@ -14,19 +14,18 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.SortType;
|
||||
import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class SearchPostSortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class SearchPostSortTypeBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
@BindView(R.id.relevance_type_text_view_search_sort_type_bottom_sheet_fragment)
|
||||
TextView relevanceTypeTextView;
|
||||
|
@ -14,19 +14,18 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.SortType;
|
||||
import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class SearchUserAndSubredditSortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class SearchUserAndSubredditSortTypeBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_FRAGMENT_POSITION = "EFP";
|
||||
@BindView(R.id.relevance_type_text_view_search_user_and_subreddit_sort_type_bottom_sheet_fragment)
|
||||
|
@ -9,12 +9,11 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.activities.PostGalleryActivity;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
public class SelectOrCaptureImageBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class SelectOrCaptureImageBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
private PostGalleryActivity mActivity;
|
||||
|
||||
|
@ -9,14 +9,13 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.activities.SelectedSubredditsAndUsersActivity;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
public class SelectSubredditsOrUsersOptionsBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class SelectSubredditsOrUsersOptionsBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
@BindView(R.id.select_subreddits_text_view_search_user_and_subreddit_sort_type_bottom_sheet_fragment)
|
||||
TextView selectSubredditsTextView;
|
||||
|
@ -11,14 +11,13 @@ import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.SetAsWallpaperCallback;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
public class SetAsWallpaperBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class SetAsWallpaperBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_VIEW_PAGER_POSITION = "EVPP";
|
||||
|
||||
|
@ -18,17 +18,16 @@ import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.post.Post;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
import ml.docilealligator.infinityforreddit.post.Post;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class ShareLinkBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class ShareLinkBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
public static final String EXTRA_POST_LINK = "EPL";
|
||||
public static final String EXTRA_MEDIA_LINK = "EML";
|
||||
public static final String EXTRA_MEDIA_TYPE = "EMT";
|
||||
|
@ -14,18 +14,17 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.SortType;
|
||||
import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class SortTimeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class SortTimeBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_SORT_TYPE = "EST";
|
||||
|
||||
|
@ -14,19 +14,18 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.SortType;
|
||||
import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class SortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class SortTypeBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_NO_BEST_TYPE = "ENBT";
|
||||
@BindView(R.id.best_type_text_view_sort_type_bottom_sheet_fragment)
|
||||
|
@ -9,14 +9,14 @@ import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.UploadImageEnabledActivity;
|
||||
import ml.docilealligator.infinityforreddit.adapters.UploadedImagesRecyclerViewAdapter;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
public class UploadedImagesBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class UploadedImagesBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_UPLOADED_IMAGES = "EUI";
|
||||
|
||||
|
@ -16,14 +16,13 @@ import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.activities.LinkResolverActivity;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.activities.LinkResolverActivity;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
public class UrlMenuBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class UrlMenuBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
public static final String EXTRA_URL = "EU";
|
||||
@BindView(R.id.link_text_view_url_menu_bottom_sheet_fragment)
|
||||
|
@ -13,19 +13,18 @@ import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import ml.docilealligator.infinityforreddit.R;
|
||||
import ml.docilealligator.infinityforreddit.SortType;
|
||||
import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback;
|
||||
import ml.docilealligator.infinityforreddit.customviews.LandscapeExpandedRoundedBottomSheetDialogFragment;
|
||||
|
||||
|
||||
/**
|
||||
* A simple {@link Fragment} subclass.
|
||||
*/
|
||||
public class UserThingSortTypeBottomSheetFragment extends RoundedBottomSheetDialogFragment {
|
||||
public class UserThingSortTypeBottomSheetFragment extends LandscapeExpandedRoundedBottomSheetDialogFragment {
|
||||
|
||||
@BindView(R.id.new_type_text_view_user_thing_sort_type_bottom_sheet_fragment)
|
||||
TextView newTypeTextView;
|
||||
|
@ -0,0 +1,16 @@
|
||||
package ml.docilealligator.infinityforreddit.customviews;
|
||||
|
||||
import android.view.View;
|
||||
|
||||
import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment;
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
|
||||
public class LandscapeExpandedRoundedBottomSheetDialogFragment extends RoundedBottomSheetDialogFragment {
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
View parentView = (View) requireView().getParent();
|
||||
BottomSheetBehavior.from(parentView).setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||
BottomSheetBehavior.from(parentView).setSkipCollapsed(true);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user