zoukankan      html  css  js  c++  java
  • 寒假学习day05

    创建Android项目时,发现有很多配置文件。对其中比较重要的三种:MainActivity.java,布局文件:activity_main和Android配置文件:AndroidManifest.xml,进行了了解。

    MainActivity.java:

    代码如下:

    <RelativeLayout 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"
        tools:context=".MainActivity">
    
        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/hello_world" />
    
    </RelativeLayout>

    代码分析:

    AndroidManifest.xml配置文件:

    代码如下:

    <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="jay.com.example.firstapp" >
    
        <application
            android:allowBackup="true"
            android:icon="@mipmap/ic_launcher"
            android:label="@string/app_name"
            android:theme="@style/AppTheme" >
            <activity
                android:name=".MainActivity"
                android:label="@string/app_name" >
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
    
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>
        </application>
    
    </manifest>

    代码分析:

  • 相关阅读:
    《人月神话》阅读笔记01
    第二次团队冲刺第八天
    第二次团队冲刺第七天
    第二次团队冲刺第六天
    找水王续
    团队第二次冲刺第五天
    第二次团队冲刺第四天
    原码, 反码, 补码 详解
    《用户故事与敏捷方法》阅读笔记06
    《用户故事与敏捷方法》阅读笔记05
  • 原文地址:https://www.cnblogs.com/lxywsx/p/14902601.html
Copyright © 2011-2022 走看看