1

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>
Antti29
  • 2,953
  • 12
  • 34
  • 36
Gennadii Ianchev
  • 129
  • 1
  • 2
  • 11

1 Answers1

1
    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" />
Ankit Aman
  • 999
  • 6
  • 15