I am trying to generate a message sale that scrolls down as I insert text in a% multiline% code, but the% co_of% does not work when I try to move it up to see the previous messages.
<ScrollView
android:id="@+id/idChat"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
android:fillViewport="true">
<TextView
style="@style/chat"
android:id="@+id/textoChat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:maxLines="50"
android:text="" />
</ScrollView>
And the logical part:
public void mensaje (View vista){
String msg = getResources().getString(R.string.msg1);
Chat(msg + System.getProperty ("line.separator"));
}
public void Chat(String msg){
TextView lista = findViewById(R.id.textoChat);
lista.append(msg);
}