I added an EditText into a layout for a notepad application. When I tried typing into the EditText I realized that if the text string is longer than the edges of the screen it will just continue past in a straight line instead of going to the next line down. The code for the layout is below.
<ScrollView
android:layout_height="match_parent"
android:layout_width="match_parent"
android:fillViewport="true"
xmlns:android="http://ift.tt/nIICcg">
<LinearLayout
xmlns:android="http://ift.tt/nIICcg"
android:id="@+id/noteEditorLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<EditText
android:id="@+id/noteEditor"
android:layout_width="0dp"
android:layout_height="match_parent"
android:hint="@string/enterText"
android:textSize="18sp"
android:background="#00000000"
android:inputType="textMultiLine|textCapSentences"
android:gravity="top"
android:layout_weight="1">
</EditText>
</LinearLayout>
Thanks.
Aucun commentaire:
Enregistrer un commentaire