android - Display only single line at a time, in a Multiline Edittext -


i have tried android:singleline, maxlines, linespacing attributes edittext displays part of next line. how can force display single line @ time?

<edittext     android:layout_width="match_parent"     android:layout_height="30dp"     android:id="@+id/formulaview"     android:textcolor="#000000"     android:textcursordrawable="@drawable/visible_cursor"     android:background="#ffffff"     android:layout_margintop="1dp"     android:textsize="18sp"     android:maxheight="30dp"     android:gravity="center_vertical"     android:layout_marginbottom="1dp"     android:paddingstart="10dp"     android:paddingend="10dp"     android:scrollbars="vertical"     android:imeoptions="actionnext"     android:completionthreshold="1"     android:inputtype="textmultiline|textnosuggestions"/> 

enter image description here

don't use

android:inputtype="textmultiline|textnosuggestions" 

instead use:

android:inputtype="textnosuggestions"  

code:

<edittext         android:layout_width="match_parent"         android:layout_height="30dp"         android:id="@+id/formulaview"         android:textcolor="#000000"         android:background="#ffffff"         android:layout_margintop="1dp"         android:textsize="18sp"         android:text="=sum(android,hello,how,are,you) goodmorining"         android:maxheight="30dp"         android:gravity="center_vertical"         android:layout_marginbottom="1dp"         android:paddingstart="10dp"         android:paddingend="10dp"         android:scrollbars="vertical"         android:imeoptions="actionnext"         android:completionthreshold="1"         android:singleline="true"         android:inputtype="textnosuggestions"/> 

hope help.

have great day ahead.


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -