Android Limit EditText to 3 lines
<p>We have a two edittext widgets one is limited to 1 line the other we are trying to limit it to 3 lines. The XML code posted below works for the limit to 1 line the limit to 3 lines fails. I have a less than elegant solution just use 3 single line edittext widgets. All of my research has pointed to using a key listener or a text watcher with further debate about keyboard types. Either way my ability level is not sure how to write or where to put that code for either of these supported solution. We would like to know how to solve this maxLines = 3 input issue.
Best Link <a href="https://stackoverflow.com/questions/22869687/android-edittext-with-fixed-number-of-max-lines-and-no-scrolling">HERE</a> </p>

<pre><code>    &lt;EditText
    android:layout_width="300dp"
    android:layout_height="wrap_content"
    android:ems="10"
    android:id="@+id/etSecAnswer"
    android:layout_marginStart="140dp"
    android:layout_marginTop="230dp"
    android:textStyle="bold"
    android:textSize="16sp"
    android:maxLines="1"
    android:inputType="text"
    android:textColor="@color/color_Black"/&gt;

&lt;EditText
    android:layout_width="420dp"
    android:layout_height="wrap_content"
    android:ems="10"
    android:id="@+id/etNotes"
    android:layout_marginTop="260dp"
    android:layout_marginLeft="140dp"
    android:textStyle="bold"
    android:textSize="16sp"
    android:textColor="@color/color_Black"
    android:maxLines="3"
    android:inputType="text|textMultiLine" /&gt;
</code></pre>