Android应用软件开发

194课时
693学过
8分

课程评价 (0)

请对课程作出评价:
0/300

学员评价

暂无精选评价
5分钟

2.1.1案例分析

实施步骤

新建一个Module,命名为Ex2-1-1,其他默认设置。

本例仅需设计界面布局文件,清单如下:

表2-1-1 Ex2-1-1 activity_main.xml文件清单

<?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:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    tools:context=".MainActivity">
    <TextView
        android:layout_width="160dp"
        android:layout_height="16dp"
        android:text="欢迎来到Android世界!" />
</LinearLayout>