maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
921 stars 77 forks source link

InputEditText stroke and hint not visible in day mode #38

Closed Queike closed 3 years ago

Queike commented 3 years ago

Describe the bug InputEditText box stroke and hint are not visible in day mode. I tried to set all listed in documentation style items attributes, but InputEditText box stroke and hint are visible only when sheet is in dark mode. Another parts like title or buttons texts are visible as expected (dark texts in day mode and light texts in dark mode) and have color as I set in styles.xml.

Library Version: 2.0.0 and previous

To Reproduce Steps to reproduce the behavior:

  1. Add InputSheet with InputEditText
  2. Set attributes in styles.xml :
<style name="AppTheme" parent="Theme.MaterialComponents.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
        <item name="android:textColorPrimary">@color/darkGray</item>
        <item name="android:textColor">@color/darkGray</item>
        <item name="fontFamily">@font/poppins</item>

        <!-- Sheet theme customization -->
        <item name="sheetPrimaryColor">@color/darkGray</item>
        <item name="sheetHighlightColor">@color/colorPrimary</item>
        <item name="sheetBackgroundColor">@color/white</item>
        <item name="sheetDividerColor">@color/lightGray</item>
        <item name="sheetIconsColor">@color/darkGray</item>
        <item name="sheetTextInputLayoutBoxStrokeColor">@color/colorPrimary</item>
        <item name="sheetTextInputLayoutHintTextColor">@color/darkGray</item>

    </style>

where color values are:

<resources>
    <color name="colorPrimary">#ff598e</color>
    <color name="colorPrimaryDark">#fe5a5f</color>
    <color name="colorAccent">#1e1e1e</color>
    <color name="basicGray">#e6e6e6</color>
    <color name="colorPrimaryDarkPale">#ff8a8e</color>

    <color name="gray">#cccccc</color>
    <color name="lightGray">#f4f4f4</color>
    <color name="darkGray">#666665</color>
    <color name="white">#ffffff</color>
    <color name="transparent">#00ffffff</color>
</resources>
  1. See that InputEditText is not visible but works fine.

Expected behavior I should see the InputEditText box stroke color and hint color as I set in sheetTextInputLayoutBoxStrokeColor and sheetTextInputLayoutHintTextColor parameters.

Screenshots Problem is with InputEditText visibility so I am not able to show this at screenshot.

Affected Device(s):

Additional context

maxkeppeler commented 3 years ago

I noticed you use the colorPrimary for the sheetHighlightColor, that's a pretty strong color, and less of a highlight color. Is this intended?

maxkeppeler commented 3 years ago

I fixed the hint text & box color for now. However, there are still a few things that can be improved and offered as fine controls of this component, if someone wants more flexibility with the EditText / TextInputLayout. That's a task for another time. I close this issue now, it's supposed to work correctly with the upcoming 2.0.1 in a few days.

Queike commented 3 years ago

I used this strong color for sheetHighlightColor just to see where it is used in input sheet. This is not final code. Referring to your fix, thank you for this patch and I am looking forward to version 2.0.1.