0

I am seeing these TextInputLayout and TextInputEditText, but since I am developing I noticed that the capabilities of these two methods can be used by EditText only.

I researched about EditText, and it only says that the advantage of TextInputLayout and TextInputEditText is that you can put a hint on it. EditText alone can also now use hint.

So I am wondering if I can just use EditText rather than use the two methods. Also, TextInputLayout and TextInputEditText is not anymore showing in the IntelliSense.

I am currently using Android Studio 3.0

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
sgxtract
  • 25
  • 5
  • It all depends upon your requirements – Abdul Waheed Nov 15 '17 at 08:06
  • I was wondering why it was remove in the IntelliSense, maybe the developer want us not to use these `TextInputLayout` anymore or nah? That is why I am asking what is more convenient. Hmmm. What can be your suggestion? – sgxtract Nov 15 '17 at 08:12
  • this link may help you https://stackoverflow.com/questions/37833738/difference-between-textinputlayout-and-textinputedittext – Abdul Waheed Nov 15 '17 at 08:14

1 Answers1

0

TextInputEditText is child of EditText whereas TextInputLayout is a linear layout which wraps an EditText (or descendant) to show a floating label when the hint is hidden due to the user inputting text. So if you need to show such thing then you use TextInputLayout otherwise edittext is good to go with. For further information please visit :

https://developer.android.com/reference/android/support/design/widget/TextInputLayout.html

https://developer.android.com/reference/android/support/design/widget/TextInputEditText.html

Muhammad Saad Rafique
  • 3,158
  • 1
  • 13
  • 21