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"/>
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
Post a Comment