From 071ce78b7cb6e1249e56faaef6f05fa311b83a1c Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Tue, 8 Nov 2022 23:17:26 +1100 Subject: Material Design 3 Switch. Target Sdk 33. --- .../activities/CustomizePostFilterActivity.java | 6 +++--- .../activities/GiveAwardActivity.java | 6 +++--- .../activities/PostGalleryActivity.java | 4 ++-- .../activities/PostImageActivity.java | 4 ++-- .../activities/PostLinkActivity.java | 4 ++-- .../activities/PostPollActivity.java | 3 ++- .../activities/PostTextActivity.java | 3 ++- .../activities/PostVideoActivity.java | 4 ++-- .../activities/SubmitCrosspostActivity.java | 4 ++-- .../CustomizeThemeRecyclerViewAdapter.java | 4 ++-- .../customviews/CustomFontSwitchPreference.java | 25 +++++++++++++++++++++- .../settings/CustomizeMainPageTabsFragment.java | 12 +++++------ .../settings/NsfwAndSpoilerFragment.java | 12 +++++------ .../settings/PostHistoryFragment.java | 10 ++++----- .../res/layout/activity_customize_post_filter.xml | 4 ++-- app/src/main/res/layout/activity_post_gallery.xml | 2 +- app/src/main/res/layout/activity_post_image.xml | 2 +- app/src/main/res/layout/activity_post_link.xml | 2 +- app/src/main/res/layout/activity_post_poll.xml | 2 +- app/src/main/res/layout/activity_post_text.xml | 2 +- app/src/main/res/layout/activity_post_video.xml | 2 +- .../main/res/layout/activity_submit_crosspost.xml | 2 +- app/src/main/res/layout/dialog_give_award.xml | 2 +- .../layout/fragment_customize_main_page_tabs.xml | 10 ++++----- .../main/res/layout/fragment_nsfw_and_spoiler.xml | 10 ++++----- app/src/main/res/layout/fragment_post_history.xml | 8 +++---- .../res/layout/item_custom_theme_switch_item.xml | 2 +- 27 files changed, 88 insertions(+), 63 deletions(-) (limited to 'app/src/main') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java index d86da54a..5721cc50 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/CustomizePostFilterActivity.java @@ -27,7 +27,7 @@ import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.appbar.CollapsingToolbarLayout; import com.google.android.material.checkbox.MaterialCheckBox; import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import com.google.android.material.switchmaterial.SwitchMaterial; +import com.google.android.material.materialswitch.MaterialSwitch; import com.google.android.material.textfield.TextInputEditText; import com.google.android.material.textfield.TextInputLayout; import com.r0adkll.slidr.Slidr; @@ -122,13 +122,13 @@ public class CustomizePostFilterActivity extends BaseActivity { @BindView(R.id.only_nsfw_text_view_customize_post_filter_activity) TextView onlyNSFWTextView; @BindView(R.id.only_nsfw_switch_customize_post_filter_activity) - SwitchMaterial onlyNSFWSwitch; + MaterialSwitch onlyNSFWSwitch; @BindView(R.id.only_spoiler_linear_layout_customize_post_filter_activity) LinearLayout onlySpoilerLinearLayout; @BindView(R.id.only_spoiler_text_view_customize_post_filter_activity) TextView onlySpoilerTextView; @BindView(R.id.only_spoiler_switch_customize_post_filter_activity) - SwitchMaterial onlySpoilerSwitch; + MaterialSwitch onlySpoilerSwitch; @BindView(R.id.title_excludes_strings_text_input_layout_customize_post_filter_activity) TextInputLayout titleExcludesStringsTextInputLayout; @BindView(R.id.title_excludes_strings_text_input_edit_text_customize_post_filter_activity) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/GiveAwardActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/GiveAwardActivity.java index d3b32e4e..971e0b19 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/GiveAwardActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/GiveAwardActivity.java @@ -21,7 +21,7 @@ import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import com.google.android.material.switchmaterial.SwitchMaterial; +import com.google.android.material.materialswitch.MaterialSwitch; import com.r0adkll.slidr.Slidr; import java.util.concurrent.Executor; @@ -115,12 +115,12 @@ public class GiveAwardActivity extends BaseActivity { adapter = new AwardRecyclerViewAdapter(this, mCustomThemeWrapper, award -> { LayoutInflater inflater = getLayoutInflater(); View layout = inflater.inflate(R.layout.dialog_give_award, null); - SwitchMaterial switchMaterial = layout.findViewById(R.id.switch_material_give_award_dialog); + MaterialSwitch materialSwitch = layout.findViewById(R.id.switch_material_give_award_dialog); new MaterialAlertDialogBuilder(this) .setTitle(R.string.give_award_dialog_title) .setView(layout) .setPositiveButton(R.string.yes, (dialogInterface, i) -> { - boolean isAnonymous = switchMaterial.isChecked(); + boolean isAnonymous = materialSwitch.isChecked(); GiveAward.giveAwardV2(mExecutor, new Handler(), mOauthRetrofit, mAccessToken, thingFullname, award.getId(), isAnonymous, new GiveAward.GiveAwardListener() { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostGalleryActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostGalleryActivity.java index 0b746fc9..fe42c979 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostGalleryActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostGalleryActivity.java @@ -36,8 +36,8 @@ import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.divider.MaterialDivider; +import com.google.android.material.materialswitch.MaterialSwitch; import com.google.android.material.snackbar.Snackbar; -import com.google.android.material.switchmaterial.SwitchMaterial; import com.google.gson.Gson; import com.libRG.CustomTextView; @@ -133,7 +133,7 @@ public class PostGalleryActivity extends BaseActivity implements FlairBottomShee @BindView(R.id.receive_post_reply_notifications_text_view_post_gallery_activity) TextView receivePostReplyNotificationsTextView; @BindView(R.id.receive_post_reply_notifications_switch_material_post_gallery_activity) - SwitchMaterial receivePostReplyNotificationsSwitchMaterial; + MaterialSwitch receivePostReplyNotificationsSwitchMaterial; @BindView(R.id.divider_2_post_gallery_activity) MaterialDivider divider2; @BindView(R.id.post_title_edit_text_post_gallery_activity) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java index 3d595b09..739d6a66 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostImageActivity.java @@ -34,8 +34,8 @@ import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.divider.MaterialDivider; import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.materialswitch.MaterialSwitch; import com.google.android.material.snackbar.Snackbar; -import com.google.android.material.switchmaterial.SwitchMaterial; import com.libRG.CustomTextView; import org.greenrobot.eventbus.EventBus; @@ -120,7 +120,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF @BindView(R.id.receive_post_reply_notifications_text_view_post_image_activity) TextView receivePostReplyNotificationsTextView; @BindView(R.id.receive_post_reply_notifications_switch_material_post_image_activity) - SwitchMaterial receivePostReplyNotificationsSwitchMaterial; + MaterialSwitch receivePostReplyNotificationsSwitchMaterial; @BindView(R.id.divider_2_post_image_activity) MaterialDivider divider2; @BindView(R.id.post_title_edit_text_post_image_activity) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostLinkActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostLinkActivity.java index 562b55db..caa5c873 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostLinkActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostLinkActivity.java @@ -28,8 +28,8 @@ import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.divider.MaterialDivider; +import com.google.android.material.materialswitch.MaterialSwitch; import com.google.android.material.snackbar.Snackbar; -import com.google.android.material.switchmaterial.SwitchMaterial; import com.libRG.CustomTextView; import org.greenrobot.eventbus.EventBus; @@ -117,7 +117,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr @BindView(R.id.receive_post_reply_notifications_text_view_post_link_activity) TextView receivePostReplyNotificationsTextView; @BindView(R.id.receive_post_reply_notifications_switch_material_post_link_activity) - SwitchMaterial receivePostReplyNotificationsSwitchMaterial; + MaterialSwitch receivePostReplyNotificationsSwitchMaterial; @BindView(R.id.post_title_edit_text_post_link_activity) EditText titleEditText; @BindView(R.id.suggest_title_button_post_link_activity) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostPollActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostPollActivity.java index 945fb86f..fccbd61b 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostPollActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostPollActivity.java @@ -30,6 +30,7 @@ import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.divider.MaterialDivider; +import com.google.android.material.materialswitch.MaterialSwitch; import com.google.android.material.slider.Slider; import com.google.android.material.snackbar.Snackbar; import com.google.android.material.switchmaterial.SwitchMaterial; @@ -118,7 +119,7 @@ public class PostPollActivity extends BaseActivity implements FlairBottomSheetFr @BindView(R.id.receive_post_reply_notifications_text_view_post_poll_activity) TextView receivePostReplyNotificationsTextView; @BindView(R.id.receive_post_reply_notifications_switch_material_post_poll_activity) - SwitchMaterial receivePostReplyNotificationsSwitchMaterial; + MaterialSwitch receivePostReplyNotificationsSwitchMaterial; @BindView(R.id.divider_2_post_poll_activity) MaterialDivider divider2; @BindView(R.id.post_title_edit_text_post_poll_activity) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java index 2b608bbf..c1c3dfe0 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostTextActivity.java @@ -34,6 +34,7 @@ import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.divider.MaterialDivider; +import com.google.android.material.materialswitch.MaterialSwitch; import com.google.android.material.snackbar.Snackbar; import com.google.android.material.switchmaterial.SwitchMaterial; import com.libRG.CustomTextView; @@ -129,7 +130,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr @BindView(R.id.receive_post_reply_notifications_text_view_post_text_activity) TextView receivePostReplyNotificationsTextView; @BindView(R.id.receive_post_reply_notifications_switch_material_post_text_activity) - SwitchMaterial receivePostReplyNotificationsSwitchMaterial; + MaterialSwitch receivePostReplyNotificationsSwitchMaterial; @BindView(R.id.divider_2_post_text_activity) MaterialDivider divider2; @BindView(R.id.post_title_edit_text_post_text_activity) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostVideoActivity.java index d9e36ee5..7289835d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/PostVideoActivity.java @@ -40,8 +40,8 @@ import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import com.google.android.material.divider.MaterialDivider; import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.materialswitch.MaterialSwitch; import com.google.android.material.snackbar.Snackbar; -import com.google.android.material.switchmaterial.SwitchMaterial; import com.libRG.CustomTextView; import org.greenrobot.eventbus.EventBus; @@ -123,7 +123,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF @BindView(R.id.receive_post_reply_notifications_text_view_post_video_activity) TextView receivePostReplyNotificationsTextView; @BindView(R.id.receive_post_reply_notifications_switch_material_post_video_activity) - SwitchMaterial receivePostReplyNotificationsSwitchMaterial; + MaterialSwitch receivePostReplyNotificationsSwitchMaterial; @BindView(R.id.divider_2_post_video_activity) MaterialDivider divider2; @BindView(R.id.post_title_edit_text_post_video_activity) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubmitCrosspostActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubmitCrosspostActivity.java index 9ce13935..392535c0 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubmitCrosspostActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/SubmitCrosspostActivity.java @@ -35,8 +35,8 @@ import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView; import com.google.android.material.appbar.AppBarLayout; import com.google.android.material.button.MaterialButton; import com.google.android.material.dialog.MaterialAlertDialogBuilder; +import com.google.android.material.materialswitch.MaterialSwitch; import com.google.android.material.snackbar.Snackbar; -import com.google.android.material.switchmaterial.SwitchMaterial; import com.libRG.CustomTextView; import org.greenrobot.eventbus.EventBus; @@ -120,7 +120,7 @@ public class SubmitCrosspostActivity extends BaseActivity implements FlairBottom @BindView(R.id.receive_post_reply_notifications_text_view_submit_crosspost_activity) TextView receivePostReplyNotificationsTextView; @BindView(R.id.receive_post_reply_notifications_switch_material_submit_crosspost_activity) - SwitchMaterial receivePostReplyNotificationsSwitchMaterial; + MaterialSwitch receivePostReplyNotificationsSwitchMaterial; @BindView(R.id.divider_3_submit_crosspost_activity) View divider3; @BindView(R.id.post_title_edit_text_submit_crosspost_activity) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CustomizeThemeRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CustomizeThemeRecyclerViewAdapter.java index 5c31046b..eb4fddb5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CustomizeThemeRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CustomizeThemeRecyclerViewAdapter.java @@ -13,7 +13,7 @@ import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import com.google.android.material.switchmaterial.SwitchMaterial; +import com.google.android.material.materialswitch.MaterialSwitch; import java.util.ArrayList; @@ -166,7 +166,7 @@ public class CustomizeThemeRecyclerViewAdapter extends RecyclerView.Adapter { + onClick(); + }); if (customThemeWrapper != null) { if (iconImageView instanceof ImageView) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeMainPageTabsFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeMainPageTabsFragment.java index 1a5cab8a..4346fef7 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeMainPageTabsFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/CustomizeMainPageTabsFragment.java @@ -21,7 +21,7 @@ import androidx.constraintlayout.widget.ConstraintLayout; import androidx.fragment.app.Fragment; import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import com.google.android.material.switchmaterial.SwitchMaterial; +import com.google.android.material.materialswitch.MaterialSwitch; import javax.inject.Inject; import javax.inject.Named; @@ -55,7 +55,7 @@ public class CustomizeMainPageTabsFragment extends Fragment { @BindView(R.id.show_tab_names_title_text_view_customize_main_page_tabs_fragment) TextView showTabNamesTitleTextView; @BindView(R.id.show_tab_names_switch_material_customize_main_page_tabs_fragment) - SwitchMaterial showTabNamesSwitch; + MaterialSwitch showTabNamesSwitch; @BindView(R.id.divider_1_customize_main_page_tabs_fragment) View divider1; @BindView(R.id.tab_1_group_summary_customize_main_page_tabs_fragment) @@ -139,25 +139,25 @@ public class CustomizeMainPageTabsFragment extends Fragment { @BindView(R.id.show_favorite_multireddits_title_text_view_customize_main_page_tabs_fragment) TextView showFavoriteMultiredditsTitleTextView; @BindView(R.id.show_favorite_multireddits_switch_material_customize_main_page_tabs_fragment) - SwitchMaterial showFavoriteMultiredditsSwitchMaterial; + MaterialSwitch showFavoriteMultiredditsSwitchMaterial; @BindView(R.id.show_multireddits_linear_layout_customize_main_page_tabs_fragment) LinearLayout showMultiredditsLinearLayout; @BindView(R.id.show_multireddits_title_text_view_customize_main_page_tabs_fragment) TextView showMultiredditsTitleTextView; @BindView(R.id.show_multireddits_switch_material_customize_main_page_tabs_fragment) - SwitchMaterial showMultiredditsSwitchMaterial; + MaterialSwitch showMultiredditsSwitchMaterial; @BindView(R.id.show_subscribed_subreddits_linear_layout_customize_main_page_tabs_fragment) LinearLayout showSubscribedSubredditsLinearLayout; @BindView(R.id.show_subscribed_subreddits_title_text_view_customize_main_page_tabs_fragment) TextView showSubscribedSubredditsTitleTextView; @BindView(R.id.show_subscribed_subreddits_switch_material_customize_main_page_tabs_fragment) - SwitchMaterial showSubscribedSubredditsSwitchMaterial; + MaterialSwitch showSubscribedSubredditsSwitchMaterial; @BindView(R.id.show_favorite_subscribed_subreddits_linear_layout_customize_main_page_tabs_fragment) LinearLayout showFavoriteSubscribedSubredditsLinearLayout; @BindView(R.id.show_favorite_subscribed_subreddits_title_text_view_customize_main_page_tabs_fragment) TextView showFavoriteSubscribedSubredditsTitleTextView; @BindView(R.id.show_favorite_subscribed_subreddits_switch_material_customize_main_page_tabs_fragment) - SwitchMaterial showFavoriteSubscribedSubredditsSwitchMaterial; + MaterialSwitch showFavoriteSubscribedSubredditsSwitchMaterial; @Inject @Named("main_activity_tabs") SharedPreferences mainActivityTabsSharedPreferences; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java index b61f4635..a17649c5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/NsfwAndSpoilerFragment.java @@ -13,7 +13,7 @@ import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import com.google.android.material.dialog.MaterialAlertDialogBuilder; -import com.google.android.material.switchmaterial.SwitchMaterial; +import com.google.android.material.materialswitch.MaterialSwitch; import org.greenrobot.eventbus.EventBus; @@ -40,25 +40,25 @@ public class NsfwAndSpoilerFragment extends Fragment { @BindView(R.id.enable_nsfw_text_view_nsfw_and_spoiler_fragment) TextView enableNsfwTextView; @BindView(R.id.enable_nsfw_switch_nsfw_and_spoiler_fragment) - SwitchMaterial enableNsfwSwitchMaterial; + MaterialSwitch enableNsfwSwitchMaterial; @BindView(R.id.blur_nsfw_linear_layout_nsfw_and_spoiler_fragment) LinearLayout blurNsfwLinearLayout; @BindView(R.id.blur_nsfw_text_view_nsfw_and_spoiler_fragment) TextView blurNsfwTextView; @BindView(R.id.blur_nsfw_switch_nsfw_and_spoiler_fragment) - SwitchMaterial blurNsfwSwitchMaterial; + MaterialSwitch blurNsfwSwitchMaterial; @BindView(R.id.do_not_blur_nsfw_in_nsfw_subreddits_linear_layout_nsfw_and_spoiler_fragment) LinearLayout doNotBlurNsfwInNsfwSubredditsLinearLayout; @BindView(R.id.do_not_blur_nsfw_text_view_nsfw_and_spoiler_fragment) TextView doNotBlurNsfwInNsfwSubredditsTextView; @BindView(R.id.do_not_blur_nsfw_in_nsfw_subreddits_switch_nsfw_and_spoiler_fragment) - SwitchMaterial doNotBlurNsfwInNsfwSubredditsSwitch; + MaterialSwitch doNotBlurNsfwInNsfwSubredditsSwitch; @BindView(R.id.blur_spoiler_linear_layout_nsfw_and_spoiler_fragment) LinearLayout blurSpoilerLinearLayout; @BindView(R.id.blur_spoiler_text_view_nsfw_and_spoiler_fragment) TextView blurSpoilerTextView; @BindView(R.id.blur_spoiler_switch_nsfw_and_spoiler_fragment) - SwitchMaterial blurSpoilerSwitchMaterial; + MaterialSwitch blurSpoilerSwitchMaterial; @BindView(R.id.dangerous_text_view_nsfw_and_spoiler_fragment) TextView dangerousTextView; @BindView(R.id.disable_nsfw_forever_linear_layout_nsfw_and_spoiler_fragment) @@ -66,7 +66,7 @@ public class NsfwAndSpoilerFragment extends Fragment { @BindView(R.id.disable_nsfw_forever_text_view_nsfw_and_spoiler_fragment) TextView disableNsfwForeverTextView; @BindView(R.id.disable_nsfw_forever_switch_nsfw_and_spoiler_fragment) - SwitchMaterial disableNsfwForeverSwitchMaterial; + MaterialSwitch disableNsfwForeverSwitchMaterial; @Inject @Named("default") SharedPreferences sharedPreferences; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java index 0384f050..3ac6dcef 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/settings/PostHistoryFragment.java @@ -13,7 +13,7 @@ import android.widget.TextView; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; -import com.google.android.material.switchmaterial.SwitchMaterial; +import com.google.android.material.materialswitch.MaterialSwitch; import javax.inject.Inject; import javax.inject.Named; @@ -37,25 +37,25 @@ public class PostHistoryFragment extends Fragment { @BindView(R.id.mark_posts_as_read_text_view_post_history_fragment) TextView markPostsAsReadTextView; @BindView(R.id.mark_posts_as_read_switch_post_history_fragment) - SwitchMaterial markPostsAsReadSwitch; + MaterialSwitch markPostsAsReadSwitch; @BindView(R.id.mark_posts_as_read_after_voting_linear_layout_post_history_fragment) LinearLayout markPostsAsReadAfterVotingLinearLayout; @BindView(R.id.mark_posts_as_read_after_voting_text_view_post_history_fragment) TextView markPostsAsReadAfterVotingTextView; @BindView(R.id.mark_posts_as_read_after_voting_switch_post_history_fragment) - SwitchMaterial markPostsAsReadAfterVotingSwitch; + MaterialSwitch markPostsAsReadAfterVotingSwitch; @BindView(R.id.mark_posts_as_read_on_scroll_linear_layout_post_history_fragment) LinearLayout markPostsAsReadOnScrollLinearLayout; @BindView(R.id.mark_posts_as_read_on_scroll_text_view_post_history_fragment) TextView markPostsAsReadOnScrollTextView; @BindView(R.id.mark_posts_as_read_on_scroll_switch_post_history_fragment) - SwitchMaterial markPostsAsReadOnScrollSwitch; + MaterialSwitch markPostsAsReadOnScrollSwitch; @BindView(R.id.hide_read_posts_automatically_linear_layout_post_history_fragment) LinearLayout hideReadPostsAutomaticallyLinearLayout; @BindView(R.id.hide_read_posts_automatically_text_view_post_history_fragment) TextView hideReadPostsAutomaticallyTextView; @BindView(R.id.hide_read_posts_automatically_switch_post_history_fragment) - SwitchMaterial hideReadPostsAutomaticallySwitch; + MaterialSwitch hideReadPostsAutomaticallySwitch; @Inject @Named("post_history") SharedPreferences postHistorySharedPreferences; diff --git a/app/src/main/res/layout/activity_customize_post_filter.xml b/app/src/main/res/layout/activity_customize_post_filter.xml index 0d2dfd49..4f4695f0 100644 --- a/app/src/main/res/layout/activity_customize_post_filter.xml +++ b/app/src/main/res/layout/activity_customize_post_filter.xml @@ -265,7 +265,7 @@ android:fontFamily="?attr/font_default" android:textSize="?attr/font_default" /> - - - - - - - - - - diff --git a/app/src/main/res/layout/fragment_customize_main_page_tabs.xml b/app/src/main/res/layout/fragment_customize_main_page_tabs.xml index 1c3f627d..22cccd53 100644 --- a/app/src/main/res/layout/fragment_customize_main_page_tabs.xml +++ b/app/src/main/res/layout/fragment_customize_main_page_tabs.xml @@ -84,7 +84,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - - - - - - - - - - - - - - -