我正在尝试在Android应用中显示文本,但我对Android开发完全陌生。我很了解Java,但是,如何在应用程序的中间显示文本,就像它是一个短信应用程序一样?我有一个发送按钮,但他们点击后发送底部的文本字段,我希望能够显示他们在中间键入的内容。显示打字文本
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<EditText android:id="@+id/edit_message"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/edit_message"
android:layout_gravity="bottom" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="sendMessage"
android:text="@string/button_send"
android:layout_gravity="bottom"/>
</LinearLayout>
只需添加一个新的TextView,并在每次单击该按钮时添加该TextView。 – ElefantPhace 2013-03-06 01:51:50
我该怎么做?对不起,我对Android开发很陌生(我刚刚开始20分钟前..).. – 2013-03-06 01:53:39