medyo / android-about-page

Create an awesome About Page for your Android App in 2 minutes
2.04k stars 283 forks source link

Add style attributes #156

Closed ashutoshgngwr closed 3 years ago

ashutoshgngwr commented 3 years ago

Context

Styling AboutPage in current versions is frowned upon. Currently, we explicitly override colors in my app to override the style.

Changes

As a result of these changes, the library can also handle day/night mode changes via AppCompatDelegate.

Please let me know your thoughts!

medyo commented 3 years ago

Well done, neat implementation, Could you add an example or two to the demo project showing how to customize the styles (as many users ask for it). Thanks

ashutoshgngwr commented 3 years ago

@medyo I added everything in README.md already? Should I add more?

medyo commented 3 years ago

I was referring to the samples project (https://github.com/medyo/android-about-page/tree/master/app/) but nevermind, I'll handle it Thanks for your contribution

ashutoshgngwr commented 3 years ago

Oh, apologies, I misunderstood that in a hurry. I can add it to the sample project if you want. Please let me know!

medyo commented 3 years ago

If you could, please add few styles to demonstrate how to customize the views. something like

<!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="aboutStyle">@style/Widget.AboutPage</item>
    </style>

    <style name="Widget.AboutPage" parent="about_About">
        <item name="aboutDescriptionTextAppearance">@style/descriptionTextAppearance</item>
    </style>

    <style name="descriptionTextAppearance" parent="@android:style/TextAppearance">
        <item name="android:textStyle">bold</item>
        <item name="android:textColor">#E6FBF4</item>
    </style>
ashutoshgngwr commented 3 years ago

@medyo I used colorPrimaryDark instead. #E6FBF4 was too bright for the bright background.

medyo commented 3 years ago

?colorPrimaryDark is also too dark for the dark background, please use another color

ashutoshgngwr commented 3 years ago

@medyo replaced with primary color for the day mode and accent color for night mode.

medyo commented 3 years ago

Perfect, Thanks @ashutoshgngwr

medyo commented 3 years ago

Hi @ashutoshgngwr, as Bintray has been shut down, I'm still looking for an alternative to push the new library releases.

ashutoshgngwr commented 3 years ago

@medyo maybe try Maven Central?