EditText Android Studio

0

I have the following EditText:

<EditText
    android:layout_width = "match_parent"
    android:layout_height = "wrap_content"
    android:id = "@+id/textSenha"
    android:layout_marginTop="40dp"
    android:hint = "@string/senha"
    android:textCursorDrawable = "@drawable/cursor"
    android:backgroundTint = "@color/black"
    android:inputType = "textCapWords"/>

mynextquestion,howdoIstaythatway?Userselectfieldpasswordhintitsufferselevation

    
asked by anonymous 06.10.2015 / 00:24

1 answer

2

You need to wrap wrap of your EditText with a TextInputLayout (Documentation ).

 <android.support.design.widget.TextInputLayout
   android:layout_width="match_parent"
   android:layout_height="wrap_content">

   <EditText
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:hint="hint"
      android:id="@+id/editText1" />
  </android.support.design.widget.TextInputLayout>

To maintain compatibility it would be good to use design support library .  Add in graddle

 compile 'com.android.support:design:23.0.0'
    
06.10.2015 / 02:29