diff options
Diffstat (limited to '')
28 files changed, 97 insertions, 71 deletions
diff --git a/app/build.gradle b/app/build.gradle index 76332b12..0b5eba8b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -3,11 +3,11 @@ plugins { } android { - compileSdk 32 + compileSdk 33 defaultConfig { applicationId "ml.docilealligator.infinityforreddit" minSdk 21 - targetSdk 32 + targetSdk 33 versionCode 106 versionName "5.3.4" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -56,19 +56,20 @@ android { dependencies { /** AndroidX **/ - implementation 'androidx.appcompat:appcompat:1.4.2' - implementation 'androidx.biometric:biometric:1.2.0-alpha04' + implementation 'androidx.appcompat:appcompat:1.7.0-alpha01' + implementation 'androidx.biometric:biometric:1.2.0-alpha05' implementation 'androidx.browser:browser:1.4.0' implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation 'androidx.legacy:legacy-support-v4:1.0.0' - def lifecycleVersion = "2.3.1" + def lifecycleVersion = "2.5.1" implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-livedata:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-process:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-runtime:$lifecycleVersion" implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycleVersion" - def pagingVersion = '3.1.1' + + def pagingVersion = '3.2.0-alpha03' implementation "androidx.paging:paging-runtime:$pagingVersion" implementation "androidx.paging:paging-guava:$pagingVersion" implementation 'androidx.preference:preference:1.2.0' @@ -79,7 +80,7 @@ dependencies { implementation "androidx.room:room-guava:$roomVersion" implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01' implementation 'androidx.work:work-runtime:2.7.1' - implementation 'com.google.android.material:material:1.5.0-alpha05' + implementation 'com.google.android.material:material:1.8.0-alpha02' /** ExoPlayer **/ def exoplayerVersion = "2.18.1" @@ -110,7 +111,7 @@ dependencies { def butterknifeVersion = "10.2.3" implementation "com.jakewharton:butterknife:$butterknifeVersion" annotationProcessor "com.jakewharton:butterknife-compiler:$butterknifeVersion" - compileOnly 'com.android.databinding:viewbinding:7.3.0' + compileOnly 'com.android.databinding:viewbinding:7.3.1' // Events def eventbusVersion = "3.3.1" 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<Recy @BindView(R.id.theme_item_info_text_view_item_custom_theme_switch_item) TextView themeItemInfoTextView; @BindView(R.id.theme_item_switch_item_custom_theme_switch_item) - SwitchMaterial themeItemSwitch; + MaterialSwitch themeItemSwitch; ThemeSwitchItemViewHolder(@NonNull View itemView) { super(itemView); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/CustomFontSwitchPreference.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/CustomFontSwitchPreference.java index 8a4ee1b8..347d8b29 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/CustomFontSwitchPreference.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customviews/CustomFontSwitchPreference.java @@ -7,39 +7,62 @@ import android.view.View; import android.widget.ImageView; import android.widget.TextView; +import androidx.annotation.NonNull; import androidx.preference.PreferenceViewHolder; import androidx.preference.SwitchPreference; +import com.google.android.material.materialswitch.MaterialSwitch; + import ml.docilealligator.infinityforreddit.CustomFontReceiver; import ml.docilealligator.infinityforreddit.CustomThemeWrapperReceiver; +import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper; public class CustomFontSwitchPreference extends SwitchPreference implements CustomFontReceiver, CustomThemeWrapperReceiver { private CustomThemeWrapper customThemeWrapper; private Typeface typeface; + private MaterialSwitch materialSwitch; public CustomFontSwitchPreference(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); + setWidgetLayoutResource(R.layout.preference_switch); + } public CustomFontSwitchPreference(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); + setWidgetLayoutResource(R.layout.preference_switch); } public CustomFontSwitchPreference(Context context, AttributeSet attrs) { super(context, attrs); + setWidgetLayoutResource(R.layout.preference_switch); } public CustomFontSwitchPreference(Context context) { super(context); + setWidgetLayoutResource(R.layout.preference_switch); + } + + @Override + public void setChecked(boolean checked) { + super.setChecked(checked); + if (materialSwitch != null) { + materialSwitch.setChecked(checked); + } } @Override - public void onBindViewHolder(PreferenceViewHolder holder) { + public void onBindViewHolder(@NonNull PreferenceViewHolder holder) { super.onBindViewHolder(holder); View iconImageView = holder.findViewById(android.R.id.icon); View titleTextView = holder.findViewById(android.R.id.title); View summaryTextView = holder.findViewById(android.R.id.summary); + materialSwitch = (MaterialSwitch) holder.findViewById(R.id.material_switch_switch_preference); + materialSwitch.setChecked(isChecked()); + materialSwitch.setOnClickListener(view -> { + 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" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/only_nsfw_switch_customize_post_filter_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -295,7 +295,7 @@ android:fontFamily="?attr/font_default" android:textSize="?attr/font_default" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/only_spoiler_switch_customize_post_filter_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_post_gallery.xml b/app/src/main/res/layout/activity_post_gallery.xml index e9535b3c..2b17d894 100644 --- a/app/src/main/res/layout/activity_post_gallery.xml +++ b/app/src/main/res/layout/activity_post_gallery.xml @@ -175,7 +175,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/receive_post_reply_notifications_switch_material_post_gallery_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_post_image.xml b/app/src/main/res/layout/activity_post_image.xml index b65bd576..b4b7e80b 100644 --- a/app/src/main/res/layout/activity_post_image.xml +++ b/app/src/main/res/layout/activity_post_image.xml @@ -175,7 +175,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/receive_post_reply_notifications_switch_material_post_image_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_post_link.xml b/app/src/main/res/layout/activity_post_link.xml index ae5b0e69..d295f5fd 100644 --- a/app/src/main/res/layout/activity_post_link.xml +++ b/app/src/main/res/layout/activity_post_link.xml @@ -175,7 +175,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/receive_post_reply_notifications_switch_material_post_link_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_post_poll.xml b/app/src/main/res/layout/activity_post_poll.xml index f30abc6b..f3601995 100644 --- a/app/src/main/res/layout/activity_post_poll.xml +++ b/app/src/main/res/layout/activity_post_poll.xml @@ -175,7 +175,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/receive_post_reply_notifications_switch_material_post_poll_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml index bd7174c8..41bfef50 100644 --- a/app/src/main/res/layout/activity_post_text.xml +++ b/app/src/main/res/layout/activity_post_text.xml @@ -178,7 +178,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/receive_post_reply_notifications_switch_material_post_text_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_post_video.xml b/app/src/main/res/layout/activity_post_video.xml index 46a4dd02..9fdae5a3 100644 --- a/app/src/main/res/layout/activity_post_video.xml +++ b/app/src/main/res/layout/activity_post_video.xml @@ -175,7 +175,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/receive_post_reply_notifications_switch_material_post_video_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/activity_submit_crosspost.xml b/app/src/main/res/layout/activity_submit_crosspost.xml index 50b661a6..d4771915 100644 --- a/app/src/main/res/layout/activity_submit_crosspost.xml +++ b/app/src/main/res/layout/activity_submit_crosspost.xml @@ -182,7 +182,7 @@ android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/receive_post_reply_notifications_switch_material_submit_crosspost_activity" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/dialog_give_award.xml b/app/src/main/res/layout/dialog_give_award.xml index c38791c1..fa9dfaef 100644 --- a/app/src/main/res/layout/dialog_give_award.xml +++ b/app/src/main/res/layout/dialog_give_award.xml @@ -15,7 +15,7 @@ android:text="@string/anonymous" android:textColor="?attr/primaryTextColor" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/switch_material_give_award_dialog" android:layout_width="wrap_content" android:layout_height="wrap_content" /> 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" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/show_tab_names_switch_material_customize_main_page_tabs_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -524,7 +524,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/show_favorite_multireddits_switch_material_customize_main_page_tabs_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -555,7 +555,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/show_multireddits_switch_material_customize_main_page_tabs_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -586,7 +586,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/show_favorite_subscribed_subreddits_switch_material_customize_main_page_tabs_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -617,7 +617,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/show_subscribed_subreddits_switch_material_customize_main_page_tabs_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/fragment_nsfw_and_spoiler.xml b/app/src/main/res/layout/fragment_nsfw_and_spoiler.xml index 7ee168c5..8e795f2d 100644 --- a/app/src/main/res/layout/fragment_nsfw_and_spoiler.xml +++ b/app/src/main/res/layout/fragment_nsfw_and_spoiler.xml @@ -38,7 +38,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/enable_nsfw_switch_nsfw_and_spoiler_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -71,7 +71,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/blur_nsfw_switch_nsfw_and_spoiler_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -104,7 +104,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/do_not_blur_nsfw_in_nsfw_subreddits_switch_nsfw_and_spoiler_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -136,7 +136,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/blur_spoiler_switch_nsfw_and_spoiler_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -185,7 +185,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/disable_nsfw_forever_switch_nsfw_and_spoiler_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/fragment_post_history.xml b/app/src/main/res/layout/fragment_post_history.xml index 8105129c..05df9bca 100644 --- a/app/src/main/res/layout/fragment_post_history.xml +++ b/app/src/main/res/layout/fragment_post_history.xml @@ -52,7 +52,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/mark_posts_as_read_switch_post_history_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -84,7 +84,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/mark_posts_as_read_after_voting_switch_post_history_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -116,7 +116,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/mark_posts_as_read_on_scroll_switch_post_history_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" @@ -148,7 +148,7 @@ android:textSize="?attr/font_16" android:fontFamily="?attr/font_family" /> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/hide_read_posts_automatically_switch_post_history_fragment" android:layout_width="wrap_content" android:layout_height="wrap_content" diff --git a/app/src/main/res/layout/item_custom_theme_switch_item.xml b/app/src/main/res/layout/item_custom_theme_switch_item.xml index 9c29b265..61ae102f 100644 --- a/app/src/main/res/layout/item_custom_theme_switch_item.xml +++ b/app/src/main/res/layout/item_custom_theme_switch_item.xml @@ -34,7 +34,7 @@ </LinearLayout> - <com.google.android.material.switchmaterial.SwitchMaterial + <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/theme_item_switch_item_custom_theme_switch_item" android:layout_width="wrap_content" android:layout_height="wrap_content" |