hedzr / android-file-chooser

a lightweight file/folder chooser or picker
Apache License 2.0
284 stars 62 forks source link

Support (Alert)Dialog appcompat #66

Closed Buggaboo closed 5 years ago

Buggaboo commented 5 years ago

Changes

Replaced android.app.(Alert)Dialog with appcompat version for backwards compatible, theme and style support.

This can help to fix issues #61 and #62

    <style name="FullscreenDialog" parent="ThemeOverlay.MaterialComponents.Dialog.Alert">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">match_parent</item>
        <item name="android:windowBackground">@color/white</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowIsFloating">false</item>
    </style>
new AlertDialog.Builder(context, isTablet ? R.style.ThemeOverlay_MaterialComponents_Dialog_Alert : R.style.FullscreenDialog)
Guiorgy commented 5 years ago

so far:

  1. seems the header with title became a lot bigger. I tried a few styles, all the same: Screenshot_1557310409 2. the ids were changed, need to find those it couln't find it in the android resource package, instead using getPackageName() works.
Guiorgy commented 5 years ago

update: using the old (non material) holo AppCompat theme seems to fix the top problem, but it's still wierd