然后是主界面的界面XML
<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="vertical"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" >
<com.syxy.dice.MySurfaceView
android:id="@+id/view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<LinearLayout android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="horizontal">
<Button
android:id="@+id/play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Play" />
<Button
android:id="@+id/reset"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="reset" />
</LinearLayout>
</RelativeLayout>
</LinearLayout>
完了,你们自己看去吧
更多Android相关信息见Android 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=11
