mikepenz / AboutLibraries

AboutLibraries automatically collects all dependencies and licenses of any gradle project (Kotlin MultiPlatform), and provides easy to integrate UI components for Android and Compose-jb environments
http://mikepenz.github.io/AboutLibraries/
Apache License 2.0
3.64k stars 420 forks source link

License dialog text is not shown correctly #953

Closed LethalMaus closed 6 months ago

LethalMaus commented 8 months ago

About this issue

The dialog text is cut off for me. I am utilizing the legacy UI fragment on Android.

        val fragment = LibsBuilder()
            .withVersionShown(true)
            .withLicenseShown(true)
            .withLicenseDialog(true)
            .supportFragment()

        supportFragmentManager.beginTransaction().apply {
            replace(R.id.fragment_container, fragment)
        }.commit()

The provided screenshots show the start of the text (cannot scroll upwards) and that scrolling downwards is possible, but no text is shown.

Screenshot_20240209_143237 Screenshot_20240209_143248

Details

Checklist

mikepenz commented 8 months ago

@LethalMaus thank you for the report.

Can you reproduce this in the sample app? I just tried to see if the same happens in the FragmentActivity, and it doesn't appear to be the case.

I also notice the dialog has a different corner radius than the sample 🤔 Could it be a m2 vs m3 issue perhaps?

LethalMaus commented 8 months ago

No worries, thanks for the great library. I haven't had the time to build a mini sample app. It could be that it's M2 as we have not yet migrated.

mikepenz commented 7 months ago

Appreciated @LethalMaus

You can use the sample app in this repo perhaps: https://github.com/mikepenz/AboutLibraries/tree/develop/app

Having it reproduced in this context would really help!

LethalMaus commented 7 months ago

Alright, as soon as I get the chance I'll do so. The app is not compiling straight off the bat on my mac, will try it on my Windows PC later on this week and let you know.

mikepenz commented 7 months ago

I am building this project on a Mac, any details on what is not compiling for you?

LethalMaus commented 7 months ago
A problem occurred configuring root project 'AboutLibraries'.
> Could not determine the dependencies of task ':plugin-build:plugin:compileKotlin'.
   > No matching toolchains found for requested specification: {languageVersion=11, vendor=any, implementation=vendor-specific} for MAC_OS on aarch64.
      > No locally installed toolchains match and toolchain download repositories have not been configured.

I didnt spend long looking into it. I presume its because I'm on Java 17

mikepenz commented 7 months ago

Ah yes. It's searching for a java 11 on your system. And can't find any

LethalMaus commented 6 months ago

Found the issue. Layout gravity is the cause of the issue, so nothing to do on your side

<style name="Theme.Custom.Dialog" parent="Theme.MaterialComponents.DayNight.Dialog.Alert.Bridge">
        <item name="colorAccent">@color/app_color</item>
        <item name="android:layout_gravity">bottom</item> <!-- removing this line resolves the issue -->
        <item name="android:windowBackground">@drawable/dialog_background</item>
        <item name="android:windowMinWidthMinor">80%</item>
    </style>
mikepenz commented 6 months ago

Thank you for reporting back! greatly appreciated 👍