Reputation: 77
I want to make the multiline text auto scroll down as I add in more text:
<EditText
android:id="@+id/Text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/TypeBox"
android:layout_below="@+id/ReceiverName"
android:layout_marginLeft="10dip"
android:layout_marginRight="10dip"
android:layout_weight="0.65"
android:ems="10"
android:focusable="false"
android:gravity="bottom"
android:inputType="textMultiLine|textNoSuggestions" >
</EditText>
I have tried searching for it but all i could find is auto scroll of a text box within a scroll view.
Upvotes: 1
Views: 1667
Reputation: 1720
Add bellow code in activity onCreate(), this Add scroll behavior to text view
textView.setMovementMbehavior ScrollingMovementMethod());
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:text="text"
android:textColor="#ffffff"
android:textSize="20sp"/>
Upvotes: 0
Reputation: 2518
android:inputType="textMultiLine"
android:editable="true"
android:enabled="true"
android:minLines="6"
android:maxLines="6"
android:isScrollContainer="true"
android:focusable="true"
Refer this link for more info
Upvotes: 1
Reputation: 2004
I think, you need to add a line:
android:inputType="textFilter|textMultiLine|textNoSuggestions"
Upvotes: 0