From ca19c566c338a8c815ce68aa88e3a09987112881 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 27 Sep 2020 17:06:55 +0800 Subject: Long press the Floating Action Button to see more options. --- .../infinityforreddit/Activity/MainActivity.java | 39 +++++++- .../Activity/ViewSubredditDetailActivity.java | 43 ++++++-- .../FABMoreOptionsBottomSheetFragment.java | 87 ++++++++++++++++ .../PostTypeBottomSheetFragment.java | 1 + .../infinityforreddit/Infinity.java | 4 +- .../res/drawable-night/ic_outline_text_24px.xml | 9 -- .../res/drawable-night/ic_post_layout_24dp.xml | 9 ++ .../main/res/drawable-night/ic_refresh_24dp.xml | 9 ++ app/src/main/res/drawable-night/ic_search_24dp.xml | 5 + app/src/main/res/drawable-night/ic_sort_24dp.xml | 9 ++ .../res/drawable-night/ic_submit_post_24dp.xml | 9 ++ app/src/main/res/drawable-night/ic_text_24dp.xml | 9 ++ app/src/main/res/drawable/ic_outline_text_24px.xml | 9 -- app/src/main/res/drawable/ic_post_layout_24dp.xml | 9 ++ .../res/drawable/ic_post_layout_black_24dp.xml | 9 -- app/src/main/res/drawable/ic_refresh_24dp.xml | 9 ++ .../main/res/drawable/ic_refresh_black_24dp.xml | 9 -- app/src/main/res/drawable/ic_search_24dp.xml | 5 + .../main/res/drawable/ic_search_toolbar_24dp.xml | 5 - app/src/main/res/drawable/ic_sort_24dp.xml | 9 ++ app/src/main/res/drawable/ic_sort_toolbar_24dp.xml | 9 -- app/src/main/res/drawable/ic_submit_post_24dp.xml | 9 ++ app/src/main/res/drawable/ic_text_24dp.xml | 9 ++ .../fragment_fab_more_options_bottom_sheet.xml | 111 +++++++++++++++++++++ .../res/layout/fragment_post_type_bottom_sheet.xml | 2 +- app/src/main/res/menu/filtered_posts_activity.xml | 4 +- app/src/main/res/menu/main_activity.xml | 4 +- app/src/main/res/menu/search_activity.xml | 2 +- app/src/main/res/menu/search_result_activity.xml | 4 +- .../res/menu/subreddit_multiselection_activity.xml | 2 +- .../main/res/menu/subreddit_selection_activity.xml | 2 +- .../res/menu/view_multi_reddit_detail_activity.xml | 4 +- .../res/menu/view_subreddit_detail_activity.xml | 4 +- .../main/res/menu/view_user_detail_activity.xml | 4 +- app/src/main/res/values/strings.xml | 10 +- .../main/res/xml/data_saving_mode_preferences.xml | 5 + 36 files changed, 399 insertions(+), 83 deletions(-) create mode 100644 app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/FABMoreOptionsBottomSheetFragment.java delete mode 100644 app/src/main/res/drawable-night/ic_outline_text_24px.xml create mode 100644 app/src/main/res/drawable-night/ic_post_layout_24dp.xml create mode 100644 app/src/main/res/drawable-night/ic_refresh_24dp.xml create mode 100644 app/src/main/res/drawable-night/ic_search_24dp.xml create mode 100644 app/src/main/res/drawable-night/ic_sort_24dp.xml create mode 100644 app/src/main/res/drawable-night/ic_submit_post_24dp.xml create mode 100644 app/src/main/res/drawable-night/ic_text_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_outline_text_24px.xml create mode 100644 app/src/main/res/drawable/ic_post_layout_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_post_layout_black_24dp.xml create mode 100644 app/src/main/res/drawable/ic_refresh_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_refresh_black_24dp.xml create mode 100644 app/src/main/res/drawable/ic_search_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_search_toolbar_24dp.xml create mode 100644 app/src/main/res/drawable/ic_sort_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_sort_toolbar_24dp.xml create mode 100644 app/src/main/res/drawable/ic_submit_post_24dp.xml create mode 100644 app/src/main/res/drawable/ic_text_24dp.xml create mode 100644 app/src/main/res/layout/fragment_fab_more_options_bottom_sheet.xml 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 66689f59..c98a5e84 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MainActivity.java @@ -67,6 +67,7 @@ import ml.docilealligator.infinityforreddit.AsyncTask.GetCurrentAccountAsyncTask import ml.docilealligator.infinityforreddit.AsyncTask.InsertSubscribedThingsAsyncTask; import ml.docilealligator.infinityforreddit.AsyncTask.SwitchAccountAsyncTask; import ml.docilealligator.infinityforreddit.AsyncTask.SwitchToAnonymousAccountAsyncTask; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FABMoreOptionsBottomSheetFragment; import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostLayoutBottomSheetFragment; import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTimeBottomSheetFragment; @@ -104,7 +105,7 @@ import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES; public class MainActivity extends BaseActivity implements SortTypeSelectionCallback, PostTypeBottomSheetFragment.PostTypeSelectionCallback, PostLayoutBottomSheetFragment.PostLayoutSelectionCallback, - ActivityToolbarInterface { + ActivityToolbarInterface, FABMoreOptionsBottomSheetFragment.FABOptionSelectionCallback { static final String EXTRA_POST_TYPE = "EPT"; static final String EXTRA_MESSSAGE_FULLNAME = "ENF"; @@ -191,6 +192,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb private SortTypeBottomSheetFragment sortTypeBottomSheetFragment; private SortTimeBottomSheetFragment sortTimeBottomSheetFragment; private PostLayoutBottomSheetFragment postLayoutBottomSheetFragment; + private FABMoreOptionsBottomSheetFragment fabMoreOptionsBottomSheetFragment; private NavigationDrawerRecyclerViewAdapter adapter; private boolean mNullAccessToken = false; private String mAccessToken; @@ -264,6 +266,7 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb sortTypeBottomSheetFragment = new SortTypeBottomSheetFragment(); sortTimeBottomSheetFragment = new SortTimeBottomSheetFragment(); postLayoutBottomSheetFragment = new PostLayoutBottomSheetFragment(); + fabMoreOptionsBottomSheetFragment = new FABMoreOptionsBottomSheetFragment(); setSupportActionBar(toolbar); setToolbarGoToTop(toolbar); @@ -555,13 +558,13 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb int fabOption = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB, SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS); switch (fabOption) { case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_REFRESH: - fab.setImageResource(R.drawable.ic_refresh_black_24dp); + fab.setImageResource(R.drawable.ic_refresh_24dp); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: - fab.setImageResource(R.drawable.ic_sort_toolbar_24dp); + fab.setImageResource(R.drawable.ic_sort_24dp); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: - fab.setImageResource(R.drawable.ic_post_layout_black_24dp); + fab.setImageResource(R.drawable.ic_post_layout_24dp); break; case SharedPreferencesUtils.MAIN_ACTIVITY_BOTTOM_APP_BAR_FAB_SEARCH: fab.setImageResource(R.drawable.ic_search_black_24dp); @@ -596,6 +599,10 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb break; } }); + fab.setOnLongClickListener(view -> { + fabMoreOptionsBottomSheetFragment.show(getSupportFragmentManager(), fabMoreOptionsBottomSheetFragment.getTag()); + return true; + }); fab.setVisibility(View.VISIBLE); } @@ -1130,6 +1137,30 @@ public class MainActivity extends BaseActivity implements SortTypeSelectionCallb } } + @Override + public void fabOptionSelected(int option) { + switch (option) { + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_SUBMIT_POST: + postTypeBottomSheetFragment.show(getSupportFragmentManager(), postTypeBottomSheetFragment.getTag()); + break; + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_REFRESH: + if (sectionsPagerAdapter != null) { + sectionsPagerAdapter.refresh(); + } + break; + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_CHANGE_SORT_TYPE: + changeSortType(); + break; + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_CHANGE_POST_LAYOUT: + postLayoutBottomSheetFragment.show(getSupportFragmentManager(), postLayoutBottomSheetFragment.getTag()); + break; + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_SEARCH: + Intent intent = new Intent(this, SearchActivity.class); + startActivity(intent); + break; + } + } + private class SectionsPagerAdapter extends FragmentStateAdapter { int tabCount; boolean showFavoriteSubscribedSubreddits; 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 79c881fd..f1799f06 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSubredditDetailActivity.java @@ -60,6 +60,7 @@ import ml.docilealligator.infinityforreddit.AsyncTask.CheckIsSubscribedToSubredd import ml.docilealligator.infinityforreddit.AsyncTask.GetCurrentAccountAsyncTask; import ml.docilealligator.infinityforreddit.AsyncTask.InsertSubredditDataAsyncTask; import ml.docilealligator.infinityforreddit.AsyncTask.SwitchAccountAsyncTask; +import ml.docilealligator.infinityforreddit.BottomSheetFragment.FABMoreOptionsBottomSheetFragment; import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostLayoutBottomSheetFragment; import ml.docilealligator.infinityforreddit.BottomSheetFragment.PostTypeBottomSheetFragment; import ml.docilealligator.infinityforreddit.BottomSheetFragment.SortTimeBottomSheetFragment; @@ -89,7 +90,7 @@ import retrofit2.Retrofit; public class ViewSubredditDetailActivity extends BaseActivity implements SortTypeSelectionCallback, PostTypeBottomSheetFragment.PostTypeSelectionCallback, PostLayoutBottomSheetFragment.PostLayoutSelectionCallback, - ActivityToolbarInterface { + ActivityToolbarInterface, FABMoreOptionsBottomSheetFragment.FABOptionSelectionCallback { public static final String EXTRA_SUBREDDIT_NAME_KEY = "ESN"; public static final String EXTRA_MESSAGE_FULLNAME = "ENF"; @@ -196,6 +197,7 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp private SortTypeBottomSheetFragment sortTypeBottomSheetFragment; private SortTimeBottomSheetFragment sortTimeBottomSheetFragment; private PostLayoutBottomSheetFragment postLayoutBottomSheetFragment; + private FABMoreOptionsBottomSheetFragment fabMoreOptionsBottomSheetFragment; private int expandedTabTextColor; private int expandedTabBackgroundColor; private int expandedTabIndicatorColor; @@ -341,8 +343,8 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp sortTypeBottomSheetFragment.setArguments(bottomSheetBundle); sortTimeBottomSheetFragment = new SortTimeBottomSheetFragment(); - postLayoutBottomSheetFragment = new PostLayoutBottomSheetFragment(); + fabMoreOptionsBottomSheetFragment = new FABMoreOptionsBottomSheetFragment(); params = (AppBarLayout.LayoutParams) collapsingToolbarLayout.getLayoutParams(); @@ -643,13 +645,13 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp int fabOption = bottomAppBarSharedPreference.getInt(SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB, SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SUBMIT_POSTS); switch (fabOption) { case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_REFRESH: - fab.setImageResource(R.drawable.ic_refresh_black_24dp); + fab.setImageResource(R.drawable.ic_refresh_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_SORT_TYPE: - fab.setImageResource(R.drawable.ic_sort_toolbar_24dp); + fab.setImageResource(R.drawable.ic_sort_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_CHANGE_POST_LAYOUT: - fab.setImageResource(R.drawable.ic_post_layout_black_24dp); + fab.setImageResource(R.drawable.ic_post_layout_24dp); break; case SharedPreferencesUtils.OTHER_ACTIVITIES_BOTTOM_APP_BAR_FAB_SEARCH: fab.setImageResource(R.drawable.ic_search_black_24dp); @@ -685,6 +687,10 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp break; } }); + fab.setOnLongClickListener(view -> { + fabMoreOptionsBottomSheetFragment.show(getSupportFragmentManager(), fabMoreOptionsBottomSheetFragment.getTag()); + return true; + }); fab.setVisibility(View.VISIBLE); } else { @@ -1017,9 +1023,32 @@ public class ViewSubredditDetailActivity extends BaseActivity implements SortTyp } } + @Override + public void fabOptionSelected(int option) { + switch (option) { + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_SUBMIT_POST: + postTypeBottomSheetFragment.show(getSupportFragmentManager(), postTypeBottomSheetFragment.getTag()); + break; + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_REFRESH: + if (sectionsPagerAdapter != null) { + sectionsPagerAdapter.refresh(); + } + break; + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_CHANGE_SORT_TYPE: + sortTypeBottomSheetFragment.show(getSupportFragmentManager(), sortTypeBottomSheetFragment.getTag()); + break; + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_CHANGE_POST_LAYOUT: + postLayoutBottomSheetFragment.show(getSupportFragmentManager(), postLayoutBottomSheetFragment.getTag()); + break; + case FABMoreOptionsBottomSheetFragment.FAB_OPTION_SEARCH: + Intent intent = new Intent(this, SearchActivity.class); + intent.putExtra(SearchActivity.EXTRA_SUBREDDIT_NAME, subredditName); + startActivity(intent); + break; + } + } + private class SectionsPagerAdapter extends FragmentStateAdapter { - /*private PostFragment postFragment; - private SidebarFragment sidebarFragment;*/ SectionsPagerAdapter(FragmentManager fm, Lifecycle lifecycle) { super(fm, lifecycle); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/FABMoreOptionsBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/FABMoreOptionsBottomSheetFragment.java new file mode 100644 index 00000000..dc4b212b --- /dev/null +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/FABMoreOptionsBottomSheetFragment.java @@ -0,0 +1,87 @@ +package ml.docilealligator.infinityforreddit.BottomSheetFragment; + +import android.content.Context; +import android.os.Bundle; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import androidx.annotation.NonNull; + +import com.deishelon.roundedbottomsheet.RoundedBottomSheetDialogFragment; + +import butterknife.BindView; +import butterknife.ButterKnife; +import ml.docilealligator.infinityforreddit.R; + +public class FABMoreOptionsBottomSheetFragment extends RoundedBottomSheetDialogFragment { + + public static final int FAB_OPTION_SUBMIT_POST = 0; + public static final int FAB_OPTION_REFRESH = 1; + public static final int FAB_OPTION_CHANGE_SORT_TYPE = 2; + public static final int FAB_OPTION_CHANGE_POST_LAYOUT = 3; + public static final int FAB_OPTION_SEARCH = 4; + + @BindView(R.id.submit_post_text_view_fab_more_options_bottom_sheet_fragment) + TextView submitPostTextView; + @BindView(R.id.refresh_text_view_fab_more_options_bottom_sheet_fragment) + TextView refreshTextView; + @BindView(R.id.change_sort_type_text_view_fab_more_options_bottom_sheet_fragment) + TextView changeSortTypeTextView; + @BindView(R.id.change_post_layout_text_view_fab_more_options_bottom_sheet_fragment) + TextView changePostLayoutTextView; + @BindView(R.id.search_text_view_fab_more_options_bottom_sheet_fragment) + TextView searchTextView; + private FABOptionSelectionCallback activity; + + public FABMoreOptionsBottomSheetFragment() { + // Required empty public constructor + } + + @Override + public View onCreateView(LayoutInflater inflater, ViewGroup container, + Bundle savedInstanceState) { + // Inflate the layout for this fragment + View rootView = inflater.inflate(R.layout.fragment_fab_more_options_bottom_sheet, container, false); + + ButterKnife.bind(this, rootView); + + submitPostTextView.setOnClickListener(view -> { + activity.fabOptionSelected(FAB_OPTION_SUBMIT_POST); + dismiss(); + }); + + refreshTextView.setOnClickListener(view -> { + activity.fabOptionSelected(FAB_OPTION_REFRESH); + dismiss(); + }); + + changeSortTypeTextView.setOnClickListener(view -> { + activity.fabOptionSelected(FAB_OPTION_CHANGE_SORT_TYPE); + dismiss(); + }); + + changePostLayoutTextView.setOnClickListener(view -> { + activity.fabOptionSelected(FAB_OPTION_CHANGE_POST_LAYOUT); + dismiss(); + }); + + searchTextView.setOnClickListener(view -> { + activity.fabOptionSelected(FAB_OPTION_SEARCH); + dismiss(); + }); + + return rootView; + } + + @Override + public void onAttach(@NonNull Context context) { + super.onAttach(context); + this.activity = (FABOptionSelectionCallback) context; + } + + public interface FABOptionSelectionCallback { + void fabOptionSelected(int option); + } +} \ No newline at end of file diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostTypeBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostTypeBottomSheetFragment.java index 1f40fc22..328aeec2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostTypeBottomSheetFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/BottomSheetFragment/PostTypeBottomSheetFragment.java @@ -39,6 +39,7 @@ public class PostTypeBottomSheetFragment extends RoundedBottomSheetDialogFragmen @BindView(R.id.video_type_linear_layout_post_type_bottom_sheet_fragment) TextView videoTypeTextView; private Activity activity; + public PostTypeBottomSheetFragment() { // Required empty public constructor } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Infinity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Infinity.java index d9ee278c..4ee21747 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Infinity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Infinity.java @@ -46,9 +46,7 @@ public class Infinity extends Application { EventBus.builder().addIndex(new EventBusIndex()).installDefaultEventBus(); mNetworkWifiStatusReceiver = - new NetworkWifiStatusReceiver(() -> { - EventBus.getDefault().post(new ChangeNetworkStatusEvent(Utils.getConnectedNetwork(getApplicationContext()))); - }); + new NetworkWifiStatusReceiver(() -> EventBus.getDefault().post(new ChangeNetworkStatusEvent(Utils.getConnectedNetwork(getApplicationContext())))); registerReceiver(mNetworkWifiStatusReceiver, new IntentFilter(ConnectivityManager.CONNECTIVITY_ACTION)); } diff --git a/app/src/main/res/drawable-night/ic_outline_text_24px.xml b/app/src/main/res/drawable-night/ic_outline_text_24px.xml deleted file mode 100644 index a88d9084..00000000 --- a/app/src/main/res/drawable-night/ic_outline_text_24px.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable-night/ic_post_layout_24dp.xml b/app/src/main/res/drawable-night/ic_post_layout_24dp.xml new file mode 100644 index 00000000..c83788d8 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_post_layout_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-night/ic_refresh_24dp.xml b/app/src/main/res/drawable-night/ic_refresh_24dp.xml new file mode 100644 index 00000000..768b210a --- /dev/null +++ b/app/src/main/res/drawable-night/ic_refresh_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-night/ic_search_24dp.xml b/app/src/main/res/drawable-night/ic_search_24dp.xml new file mode 100644 index 00000000..466e71dd --- /dev/null +++ b/app/src/main/res/drawable-night/ic_search_24dp.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable-night/ic_sort_24dp.xml b/app/src/main/res/drawable-night/ic_sort_24dp.xml new file mode 100644 index 00000000..e795d2a2 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_sort_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-night/ic_submit_post_24dp.xml b/app/src/main/res/drawable-night/ic_submit_post_24dp.xml new file mode 100644 index 00000000..21ef5658 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_submit_post_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable-night/ic_text_24dp.xml b/app/src/main/res/drawable-night/ic_text_24dp.xml new file mode 100644 index 00000000..a88d9084 --- /dev/null +++ b/app/src/main/res/drawable-night/ic_text_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_outline_text_24px.xml b/app/src/main/res/drawable/ic_outline_text_24px.xml deleted file mode 100644 index 6afe43f5..00000000 --- a/app/src/main/res/drawable/ic_outline_text_24px.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_post_layout_24dp.xml b/app/src/main/res/drawable/ic_post_layout_24dp.xml new file mode 100644 index 00000000..bca9e973 --- /dev/null +++ b/app/src/main/res/drawable/ic_post_layout_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_post_layout_black_24dp.xml b/app/src/main/res/drawable/ic_post_layout_black_24dp.xml deleted file mode 100644 index bca9e973..00000000 --- a/app/src/main/res/drawable/ic_post_layout_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_refresh_24dp.xml b/app/src/main/res/drawable/ic_refresh_24dp.xml new file mode 100644 index 00000000..528662cf --- /dev/null +++ b/app/src/main/res/drawable/ic_refresh_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_refresh_black_24dp.xml b/app/src/main/res/drawable/ic_refresh_black_24dp.xml deleted file mode 100644 index 528662cf..00000000 --- a/app/src/main/res/drawable/ic_refresh_black_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_search_24dp.xml b/app/src/main/res/drawable/ic_search_24dp.xml new file mode 100644 index 00000000..9bece0ba --- /dev/null +++ b/app/src/main/res/drawable/ic_search_24dp.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_search_toolbar_24dp.xml b/app/src/main/res/drawable/ic_search_toolbar_24dp.xml deleted file mode 100644 index 466e71dd..00000000 --- a/app/src/main/res/drawable/ic_search_toolbar_24dp.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_sort_24dp.xml b/app/src/main/res/drawable/ic_sort_24dp.xml new file mode 100644 index 00000000..6cef6369 --- /dev/null +++ b/app/src/main/res/drawable/ic_sort_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_sort_toolbar_24dp.xml b/app/src/main/res/drawable/ic_sort_toolbar_24dp.xml deleted file mode 100644 index e795d2a2..00000000 --- a/app/src/main/res/drawable/ic_sort_toolbar_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_submit_post_24dp.xml b/app/src/main/res/drawable/ic_submit_post_24dp.xml new file mode 100644 index 00000000..df26adda --- /dev/null +++ b/app/src/main/res/drawable/ic_submit_post_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_text_24dp.xml b/app/src/main/res/drawable/ic_text_24dp.xml new file mode 100644 index 00000000..6afe43f5 --- /dev/null +++ b/app/src/main/res/drawable/ic_text_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/fragment_fab_more_options_bottom_sheet.xml b/app/src/main/res/layout/fragment_fab_more_options_bottom_sheet.xml new file mode 100644 index 00000000..fa7f9833 --- /dev/null +++ b/app/src/main/res/layout/fragment_fab_more_options_bottom_sheet.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml index 5dc07eb0..e89e36a2 100644 --- a/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml @@ -23,7 +23,7 @@ android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" - android:drawableStart="@drawable/ic_outline_text_24px" + android:drawableStart="@drawable/ic_text_24dp" android:drawablePadding="48dp" android:clickable="true" android:focusable="true" diff --git a/app/src/main/res/menu/filtered_posts_activity.xml b/app/src/main/res/menu/filtered_posts_activity.xml index 6e826b5a..296af78c 100644 --- a/app/src/main/res/menu/filtered_posts_activity.xml +++ b/app/src/main/res/menu/filtered_posts_activity.xml @@ -5,14 +5,14 @@ android:id="@+id/action_sort_filtered_thing_activity" android:orderInCategory="1" android:title="@string/action_sort" - android:icon="@drawable/ic_sort_toolbar_24dp" + android:icon="@drawable/ic_sort_24dp" app:showAsAction="ifRoom" /> diff --git a/app/src/main/res/menu/search_result_activity.xml b/app/src/main/res/menu/search_result_activity.xml index d503471f..9cd243a5 100644 --- a/app/src/main/res/menu/search_result_activity.xml +++ b/app/src/main/res/menu/search_result_activity.xml @@ -5,14 +5,14 @@ android:id="@+id/action_sort_search_result_activity" android:orderInCategory="1" android:title="@string/action_sort" - android:icon="@drawable/ic_sort_toolbar_24dp" + android:icon="@drawable/ic_sort_24dp" app:showAsAction="ifRoom" /> \ No newline at end of file diff --git a/app/src/main/res/menu/subreddit_selection_activity.xml b/app/src/main/res/menu/subreddit_selection_activity.xml index a55e1b97..28abcb17 100644 --- a/app/src/main/res/menu/subreddit_selection_activity.xml +++ b/app/src/main/res/menu/subreddit_selection_activity.xml @@ -5,6 +5,6 @@ android:id="@+id/action_search_subreddit_selection_activity" android:orderInCategory="1" android:title="@string/action_search" - android:icon="@drawable/ic_search_toolbar_24dp" + android:icon="@drawable/ic_search_24dp" app:showAsAction="ifRoom" /> \ No newline at end of file diff --git a/app/src/main/res/menu/view_multi_reddit_detail_activity.xml b/app/src/main/res/menu/view_multi_reddit_detail_activity.xml index 0da0d682..06257308 100644 --- a/app/src/main/res/menu/view_multi_reddit_detail_activity.xml +++ b/app/src/main/res/menu/view_multi_reddit_detail_activity.xml @@ -7,14 +7,14 @@ android:id="@+id/action_sort_view_multi_reddit_detail_activity" android:orderInCategory="1" android:title="@string/action_sort" - android:icon="@drawable/ic_sort_toolbar_24dp" + android:icon="@drawable/ic_sort_24dp" app:showAsAction="ifRoom" /> Video Download Location Separate Folder for Each Subreddit Swipe Action - Vibrate the phone when the action is triggered + Vibrate the phone when an action is triggered Disable Swiping Between Tabs Enable Swipe Action Threshold @@ -487,6 +487,7 @@ Option 4 Floating Action Button Data Saving Mode + In data saving mode, preview images are in lower resolution. Cannot get the link @@ -893,7 +894,10 @@ Unlock Account Section Unlock - - Hello blank fragment + + Submit Post + Refresh + Change Sort Type + Change Post Layout diff --git a/app/src/main/res/xml/data_saving_mode_preferences.xml b/app/src/main/res/xml/data_saving_mode_preferences.xml index 1f66892f..f120afe5 100644 --- a/app/src/main/res/xml/data_saving_mode_preferences.xml +++ b/app/src/main/res/xml/data_saving_mode_preferences.xml @@ -10,4 +10,9 @@ app:entryValues="@array/settings_data_saving_mode_values" app:useSimpleSummaryProvider="true" /> + + \ No newline at end of file -- cgit v1.2.3