SmartMaterialSpinner icon indicating copy to clipboard operation
SmartMaterialSpinner copied to clipboard

Hint label styling not working

Open khallid-itdevtech opened this issue 4 years ago • 4 comments

<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.

khallid-itdevtech avatar May 11 '21 06:05 khallid-itdevtech

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

Chivorns avatar May 11 '21 12:05 Chivorns

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 avatar May 12 '21 06:05 khallid-itdevtech

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

khallid-itdevtech avatar May 12 '21 06:05 khallid-itdevtech

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

Chivorns avatar May 19 '21 15:05 Chivorns