android - Different Colors in hint -


i using textinputlayout hint in edittext.

now, want give hint textinputlayout 2 colors.

like in image shown :

enter image description here

is possible? have tried adding text in html format not working.

code edittext :

 <android.support.design.widget.textinputlayout             android:id="@+id/pv"             android:layout_width="match_parent"             android:layout_height="wrap_content"             android:hint="property value"             android:layout_margintop="5dp"             app:hinttextappearance="@style/hinttext"              >             <com.app.aspirehomeloans.fontclass.edittext_robotoregular                 android:id="@+id/login_emailid"                 android:layout_width="match_parent"                 android:layout_height="match_parent"                 android:textsize="@dimen/edittext_size"                 android:paddingtop="3dp"                 android:imeoptions="actionnext"                 android:paddingbottom="3dp"                 android:background="@android:color/transparent"                 android:inputtype="textnosuggestions|textemailaddress"                 android:textcolor="@color/edittextcolor"                 android:textcursordrawable="@null"                 android:text=""                 android:nextfocusdown="@+id/login_password"                  />             <view             android:id="@+id/login_email_line"                 android:layout_width="match_parent"                 android:layout_height="1dp"                 android:background="@color/divercolor"                 />              </android.support.design.widget.textinputlayout> 

try code

string text = "<font color=#307575>property</font> <font color=#bdd95b> value</font>";   textinputlayout textinputlayoutobj = (textinputlayout)findviewbyid(r.id.text_input_layout_id);  textinputlayoutobj .sethint(html.fromhtml(text)); 

Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -