2 Line EditText in Android

How to create 2 line EditText in android?

It is quite easy to create the two line EditText in android, you just have to add few lines of code for this. A simple example is as given below.
For showing two line EditText at starting it is simple tricks of adding a multi-line hints in EditText, you can just use the ‘n’ twice if don’t want to show any hint.

 <EditText  
     android:id="@+id/edit_txt"  
     android:layout_width="match_parent"  
     android:layout_height="wrap_content"  
     android:inputType="textMultiLine"  
     android:hint="Two Line EditText!n This is Line 2"/>  
2 line EditText Example
2 Line EditText

Check out the TextView customization tricks here at below link.
http://nplix.com/5-ways-to-customize-textview-in-android

Get Email Updates!

Signup now receive an email once I publish new content. I will never give away, trade or sell your email address. You can unsubscribe at any time.

Join 911 other subscribers

Leave a Reply

Close Menu