Open top menu


Example:-

Restrict edittext single line, means edittext have a single line.The User Press " enter key" the cursor should not get down second line.




android:maxLines="1"
android:singleLine="true"



<EditText    
android:id="@+id/openorder_searchViewtext"    
android:layout_width="match_parent"    
android:layout_height="48dp"    
android:layout_weight="1"   
android:background="@drawable/edit_text_gradient"    
android:drawableEnd="@drawable/search_icon"   
android:drawablePadding="10dp"    
android:drawableRight="@drawable/search_icon"    
android:ellipsize="end"    
android:hint="@string/Search"    
android:maxLines="1"    
android:paddingLeft="15dp"    
android:scrollHorizontally="true" />

0 comments