<RelativeLayout
android:layout_width="match_parent" android:layout_height="match_parent" >
<TextView
android:id="@+id/text"
android:text="@string/snake_layout_text_text" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center_horizontal" android:textColor="#ff8888ff" android:textSize="24sp"/>
</RelativeLayout>
</FrameLayout>
至此,全部界面设计完成,但还有最重要的一步,就是将所有的Activity注册到AndroidManifest.xml中。AndroidManifest.xml文档如下:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 The Android Open Source Project
you may not use this file except in compliance with the License. You may obtain a copy of the License at
/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -->
supplies a unique name for the application. When writing your
own application, the package name must be changed from "com.example.*" to come from a domain that you own or have control over. --> <manifest xmlns:android="/apk/res/android" package="com.example.android.snake">
<application android:label="Snake on a Phone"> <activity android:name="Snake"
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库安卓贪吃蛇课程设计报告(16)在线全文阅读。
相关推荐: