mirror of
				https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
				synced 2025-10-30 00:18:07 +01:00 
			
		
		
		
	Material Design 3 Switch. Target Sdk 33.
This commit is contained in:
		| @@ -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" | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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() { | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
| @@ -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); | ||||
|   | ||||
| @@ -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 onBindViewHolder(PreferenceViewHolder holder) { | ||||
|     public void setChecked(boolean checked) { | ||||
|         super.setChecked(checked); | ||||
|         if (materialSwitch != null) { | ||||
|             materialSwitch.setChecked(checked); | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     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) { | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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; | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" /> | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user