mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-09 05:24:44 +01:00
make chat compose space multi-line; scroll chat history to bottom on
open
This commit is contained in:
parent
07e97107ce
commit
6b455bf743
2 changed files with 12 additions and 2 deletions
|
@ -9,7 +9,8 @@
|
||||||
<!-- history is kept in a scrolling list of textview elems so
|
<!-- history is kept in a scrolling list of textview elems so
|
||||||
different style can be applied based on whether they're local or
|
different style can be applied based on whether they're local or
|
||||||
remote. Inserted at runtime.... -->
|
remote. Inserted at runtime.... -->
|
||||||
<ScrollView android:orientation="vertical"
|
<ScrollView android:id="@+id/scroll"
|
||||||
|
android:orientation="vertical"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
|
@ -29,7 +30,7 @@
|
||||||
<EditText android:id="@+id/chat_edit"
|
<EditText android:id="@+id/chat_edit"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
android:singleLine="false"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
import android.widget.ScrollView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.eehouse.android.xw4.DlgDelegate.Action;
|
import org.eehouse.android.xw4.DlgDelegate.Action;
|
||||||
|
@ -67,6 +68,14 @@ public class ChatDelegate extends DelegateBase
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final ScrollView scroll = (ScrollView)findViewById( R.id.scroll );
|
||||||
|
scroll.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
scroll.fullScroll(View.FOCUS_DOWN);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
((Button)findViewById( R.id.send_button ))
|
((Button)findViewById( R.id.send_button ))
|
||||||
.setOnClickListener( this );
|
.setOnClickListener( this );
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue