layout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".MainActivity" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="方块"/>
<com.trunkbow.vitertris.MainView
android:id="@+id/mainView"
android:layout_width="229dp"
android:layout_height="wrap_content"
android:padding="2px" />
</LinearLayout>
主UI类
发送消息线程