zoukankan      html  css  js  c++  java
  • Android工程目录结构

    ----------siwuxie095

    首先创建一个简单的项目:MainActivity

    image

    工程目录结构一览:

    image

    工程目录结构介绍:

    1、manifests目录

    image

    里面有一个AndroidManifest.xml文件,是Android程序的配置文件

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

    2、java目录

    image

    是Android程序的所有源代码,如下面的MainActivity.java的代码:

    package com.example.siwux.mainactivity;
    
    import android.support.v7.app.AppCompatActivity;
    import android.os.Bundle;
    
    public class MainActivity extends AppCompatActivity {
    
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
        }
    }

    3、res目录

    image

    所有的资源文件所存在的目录,如layout下的布局视图资源activity_main.xml,values下的颜色colors.xml、尺寸dimens.xml、字符串strings.xml、样式styles.xml等资源

    【made by siwuxie095】

  • 相关阅读:
    [LeetCode] 226. Invert Binary Tree
    [LeetCode] 101. Symmetric Tree
    [LeetCode] 100. Same Tree
    [LeetCode] 104. Maximum Depth of Binary Tree
    [LeetCode] 280. Wiggle Sort
    [LeetCode] 42. Trapping Rain Water
    [LeetCode] 190. Reverse Bits
    [LeetCode] 144. Binary Tree Preorder Traversal
    [Leetcode] 58. Length of Last Word
    [LeetCode] 16. 3Sum Closest
  • 原文地址:https://www.cnblogs.com/siwuxie095/p/6207410.html
Copyright © 2011-2022 走看看