karasevm / PrivateDNSAndroid

Quick settings tile to switch active private DNS server
MIT License
420 stars 47 forks source link

Quick tile Selection Dialog #12

Closed InfiniteCoder06 closed 5 months ago

InfiniteCoder06 commented 7 months ago

Resolves #11 Blocking #10

InfiniteCoder06 commented 7 months ago

There was a problem with bottom sheet dialog displaying on landscape mode hence Bottom Sheet has been changed to a dialog Screenshot

karasevm commented 7 months ago

Works on dark mode, but consistently crashes for me on A14 and A13 Pixel AVDs on light mode

Trace ``` FATAL EXCEPTION: main Process: ru.karasevm.privatednstoggle, PID: 8133 java.lang.IllegalArgumentException: The style on this component requires your app theme to be Theme.AppCompat (or a descendant). at com.google.android.material.internal.ThemeEnforcement.checkTheme(ThemeEnforcement.java:247) at com.google.android.material.internal.ThemeEnforcement.checkAppCompatTheme(ThemeEnforcement.java:212) at com.google.android.material.internal.ThemeEnforcement.checkCompatibleTheme(ThemeEnforcement.java:147) at com.google.android.material.internal.ThemeEnforcement.obtainStyledAttributes(ThemeEnforcement.java:76) at com.google.android.material.dialog.MaterialDialogs.getDialogBackgroundInsets(MaterialDialogs.java:60) at com.google.android.material.dialog.MaterialAlertDialogBuilder.(MaterialAlertDialogBuilder.java:123) at com.google.android.material.dialog.MaterialAlertDialogBuilder.(MaterialAlertDialogBuilder.java:109) at ru.karasevm.privatednstoggle.DNSServerDialogFragment.onCreateDialog(DNSServerDialogFragment.kt:29) at androidx.fragment.app.DialogFragment.prepareDialog(DialogFragment.java:644) at androidx.fragment.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:558) at androidx.fragment.app.Fragment.performGetLayoutInflater(Fragment.java:1654) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:493) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002) at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:3138) at androidx.fragment.app.FragmentManager.dispatchActivityCreated(FragmentManager.java:3072) at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:251) at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:502) at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:251) at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1582) at android.app.Activity.performStart(Activity.java:8628) at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3807) at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:225) at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:205) at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:177) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:205) at android.os.Looper.loop(Looper.java:294) at android.app.ActivityThread.main(ActivityThread.java:8177) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) ```
InfiniteCoder06 commented 7 months ago

Works on dark mode, but consistently crashes for me on A14 and A13 Pixel AVDs on light mode

Looks like i didnt implement the theme in light mode.

Ready to be reviewed

karasevm commented 5 months ago

LGTM