Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint label styling not working #49

Open
khallid-itdevtech opened this issue May 11, 2021 · 4 comments
Open

Hint label styling not working #49

khallid-itdevtech opened this issue May 11, 2021 · 4 comments

Comments

@khallid-itdevtech
Copy link

khallid-itdevtech commented May 11, 2021

<com.google.android.material.textfield.TextInputLayout
android:hint="@string/hint_test"
...
/>
<string name="hint_test">Legal name <font color='#FF0000'>*</font></string>

Above code generates hint label with red * but in this library using same hint label * shows but color doesn't.

@Chivorns
Copy link
Owner

Hi @khallid-itdevtech , please try with custom attrs smsp_hint and smsp_hintColor. You can check it here

@khallid-itdevtech
Copy link
Author

device-2021-05-12-114037
Material TextInputLayout floating label
vs
SmartMaterialSpinner
device-2021-05-12-114717

Expected Result * should in color Red like above but it isn't

@khallid-itdevtech
Copy link
Author

khallid-itdevtech commented May 12, 2021

smsp_hintColor changes the whole label color but i want to show red * with label to mention it is mandatory field

@Chivorns
Copy link
Owner

Hi @khallid-itdevtech , I got you. I'm not yet able to make it support this feature. Anyway I have an idea which can apply with your requirement. Please try something like bellow sample:

<FrameLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">
    <TextView
        android:layout_width="wrap_content"
        android:hint="@string/hint_test"
        android:layout_gravity="center_vertical"
        android:layout_height="wrap_content"/>
    <com.chivorn.smartmaterialspinner.SmartMaterialSpinner
        app:smsp_hint=""
        app:smsp_paddingLeftRight="0dp"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>
</FrameLayout>

smsp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants