Android用のチャットアプリを作っています。チャット画面はどうあるべきですか?XML レイアウトで使用するすべてのビューを教えてもらえますか? それは編集テキストとリストビューですか?助けてください。Gtalk で見られるようなチャット画面を作成する必要があります。両方の人のチャット メッセージは、画面の反対側に配置する必要があります (Gtalk チャット ボックスの配置スタイルを参照)。 http://upload.wikimedia.org/wikipedia/en/7/75/Google_talk.gif
9513 次
2 に答える
2
ぴったりのものを手に入れました。なのでここでシェアします
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ScrollView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1" >
<TextView
android:text="@string/text"
android:id="@+id/textOutput"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingTop="5dp" />
</ScrollView>
<LinearLayout
android:id="@+id/linearLayout1"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:paddingBottom="5dp"
android:baselineAligned="true">
<EditText android:layout_weight="1" android:id="@+id/textInput"
android:layout_height="45dp" android:layout_width="0dip">
<requestFocus></requestFocus>
</EditText>
<Button android:text="Send"
android:layout_height="45dp" android:layout_width="125dp"
android:id="@+id/btnSend"></Button>
</LinearLayout>
于 2012-09-21T11:28:27.250 に答える