Gennadii Ianchev
Gennadii Ianchev

Reputation: 131

Is it possible to manage the tooltip in widget.TextInputLayout

As Edittext it is not the only one in the group widget. With TextInputLayout the hint didn't work. Tell me is there any way else to summon help?

This is my layout:

<android.support.design.widget.TextInputLayout
    android:id="@+id/til_account"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginTop="10dp"
    android:layout_weight="1"
    android:textColorHint="@color/colorTextHint">
    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <EditText
            android:id="@+id/et_account_tint"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textColor="@color/colorTextHint"
            android:maxLines="1"
            android:theme="@style/EditText"
            android:textSize="16sp" />
        <EditText
            android:id="@+id/et_account"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignParentStart="true"
            android:layout_alignParentTop="true"
            android:drawableRight="@mipmap/ic_selectcontact"
            android:hint="@string/enter_phone_number_contact_name"
            android:inputType="text"
            android:maxLines="1"
            android:textColorHint="@color/colorTextHint"
            android:textSize="16sp"
            android:theme="@style/EditText" />
        <TextView
            android:id="@+id/et_account_button"
            android:layout_width="70dp"
            android:layout_height="35dp"
            android:layout_alignParentEnd="true"
            android:layout_alignParentRight="true"
            android:layout_alignParentTop="true"
            android:background="@android:color/transparent"
            android:onClick="@{presenter::onClick}"
            android:textSize="16sp"
            tools:ignore="LabelFor" />
    </RelativeLayout>
</android.support.design.widget.TextInputLayout>

Upvotes: 1

Views: 710

Answers (1)

Ankit Aman
Ankit Aman

Reputation: 1009

    Do like this 



           <android.support.design.widget.TextInputLayout
                        android:id="@+id/til_account"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginTop="10dp"
                        android:layout_weight="1"
                        app:hintEnabled="true" app:hintAnimationEnabled="false"
                        android:textColorHint="@color/colorTextHint">

                            <EditText
                                android:id="@+id/et_account_tint"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:textColor="@color/colorTextHint"
                                android:maxLines="1"
                                android:theme="@style/EditText"
                                android:textSize="16sp" />

                 </android.support.design.widget.TextInputLayout>

               <android.support.design.widget.TextInputLayout
                        android:id="@+id/til_account"
                        android:layout_width="match_parent"
                        android:layout_height="match_parent"
                        android:layout_marginTop="10dp"
                        android:layout_weight="1"
                     app:hintEnabled="true" 
                   app:hintAnimationEnabled="false"
                        android:textColorHint="@color/colorTextHint">
                            <EditText
                                android:id="@+id/et_account"
                                android:layout_width="match_parent"
                                android:layout_height="wrap_content"
                                android:layout_alignParentStart="true"
                                android:layout_alignParentTop="true"
                                android:drawableRight="@mipmap/ic_selectcontact"                           android:hint="@string/enter_phone_number_contact_name"
                                android:inputType="text"
                                android:maxLines="1"
                                android:textColorHint="@color/colorTextHint"
                                android:textSize="16sp"
                                android:theme="@style/EditText" />
    </android.support.design.widget.TextInputLayout>
                            <TextView
                                android:id="@+id/et_account_button"
                                android:layout_width="70dp"
                                android:layout_height="35dp"
                                android:layout_alignParentEnd="true"
                                android:layout_alignParentRight="true"
                                android:layout_alignParentTop="true"
                               android:background="@android:color/transparent"
                                android:onClick="@{presenter::onClick}"
                                android:textSize="16sp"
                                tools:ignore="LabelFor" />

Upvotes: 1

Related Questions