diff --git a/app_pojavlauncher/src/main/java/com/kdt/SideDialogView.java b/app_pojavlauncher/src/main/java/com/kdt/SideDialogView.java index 6b056051b0..80b9cc86ff 100644 --- a/app_pojavlauncher/src/main/java/com/kdt/SideDialogView.java +++ b/app_pojavlauncher/src/main/java/com/kdt/SideDialogView.java @@ -28,15 +28,14 @@ /** * The base class for side dialog views * A side dialog is a dialog appearing from one side of the screen - * @param The type of the content view root */ -public abstract class SideDialogView { +public abstract class SideDialogView { private final ViewGroup mParent; private final @LayoutRes int mLayoutId; private ViewGroup mDialogLayout; private DefocusableScrollView mScrollView; - protected T mDialogContent; + protected View mDialogContent; protected final int mMargin; private ObjectAnimator mSideDialogAnimator; @@ -103,7 +102,7 @@ private void inflateLayout() { mTitleDivider = mDialogLayout.findViewById(R.id.side_dialog_title_divider); LayoutInflater.from(mParent.getContext()).inflate(mLayoutId, mScrollView, true); - mDialogContent = (T) mScrollView.getChildAt(0); + mDialogContent = mScrollView.getChildAt(0); // Attach layouts mParent.addView(mDialogLayout); diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/customcontrols/handleview/EditControlSideDialog.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/customcontrols/handleview/EditControlSideDialog.java index 171fdad7fc..4e00c17c21 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/customcontrols/handleview/EditControlSideDialog.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/customcontrols/handleview/EditControlSideDialog.java @@ -40,7 +40,7 @@ import java.util.List; -public class EditControlSideDialog extends SideDialogView { +public class EditControlSideDialog extends SideDialogView { private final Spinner[] mKeycodeSpinners = new Spinner[4]; public boolean internalChanges = false; // True when we programmatically change stuff. @@ -326,8 +326,8 @@ private void loadAdapter() { } private void setDefaultVisibilitySetting() { - for (int i = 0; i < mDialogContent.getChildCount(); ++i) { - mDialogContent.getChildAt(i).setVisibility(VISIBLE); + for (int i = 0; i < ((ViewGroup)mDialogContent).getChildCount(); ++i) { + ((ViewGroup)mDialogContent).getChildAt(i).setVisibility(VISIBLE); } for(Spinner s : mKeycodeSpinners) { s.setVisibility(View.INVISIBLE); diff --git a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/QuickSettingSideDialog.java b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/QuickSettingSideDialog.java index fc467ceeda..a09017b6b5 100644 --- a/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/QuickSettingSideDialog.java +++ b/app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/prefs/QuickSettingSideDialog.java @@ -29,7 +29,7 @@ * Side dialog for quick settings that you can change in game * The implementation has to take action on some preference changes */ -public abstract class QuickSettingSideDialog extends com.kdt.SideDialogView { +public abstract class QuickSettingSideDialog extends com.kdt.SideDialogView { private SharedPreferences.Editor mEditor; @SuppressLint("UseSwitchCompatOrMaterialCode")