您的位置:首页 > 移动开发 > Android开发

Android学习笔记

2016-02-04 11:05 323 查看
三年多的时间以来,我以为我会慢慢忘记Android,但是好像这是我留下来的遗憾一样,永远都挥之不去。正好这几天看了梅兄的学习笔记,决定再一次把Android捡起来。

在开始之前,刚刚得到一个消息就是我的第一枚外甥女出生了,仅此纪念~!!!


项目的目录结构如图。

src:java源码目录
gen:编译生产文件的目录
assets:资源文件目录,可以放任何类型的文件,不会再R文件中生成对应的ID
res:资源文件目录,里面的文件都会在R文件中生成对应的ID

activity_activity01.xml  页面布局文件。
[code=xml;toolbar:false"><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.activity_01.Activity01" >

    <TextView 
        android:id="@+id/myTextView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        />
    
    <Button
        android:id="@+id/myButton"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
         android:layout_below="@id/myTextView"/>
</RelativeLayout>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: