下面是界面的
<?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="vertical"
tools:context="com.example.administrator.game_2048.MainActivity">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Score :"
android:textSize="25dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/tvScore"
android:textSize="25dp"/>
</LinearLayout>
<Space
android:layout_width="match_parent"
android:layout_height="15dp" />
<com.example.administrator.game_2048.GameView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.8"
android:id="@+id/gameView">
</com.example.administrator.game_2048.GameView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.1"
android:orientation="horizontal">
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/restart"
android:text="Restart"
android:textAllCaps="false"
android:background="#2bb"
android:textSize="15dp"
android:textColor="#159"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/save"
android:text="Save"
android:textAllCaps="false"
android:background="#2cc"
android:textSize="15dp"
android:textColor="#159"
/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:id="@+id/quit"
android:text="Quit"
android:textAllCaps="false"
android:background="#2dd"
android:textSize="15dp"
android:textColor="#159"
/>
</LinearLayout>
</LinearLayout>