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>
在开始之前,刚刚得到一个消息就是我的第一枚外甥女出生了,仅此纪念~!!!
项目的目录结构如图。
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>
相关文章推荐
- android selector用法
- ANDROID 返回,菜单和HOME键的监听
- Android 之LocalBroadcastManager
- Android NestedScrolling 实战
- Android样式的开发:selector篇
- Android 自定义命名空间
- 编译Android4.3内核源代码
- Android开发的那些坑和小技巧
- Android布局之相对布局——RelativeLayout
- 关于MpAndroidChart的折线图问题
- Android 第八天 (上午)
- Android子线程向主线程发送消息实现
- Android 编译使用高版本的Java
- Android WebView 因重定向无法正常goBack()解决方案
- Android垃圾回收机制解决内存泄露问题
- Android Studio 遇到 maximum Java heap size to 1024 MB
- Android WebView的Js对象注入漏洞解决方案
- android 自定义控件
- Android 实用代码片段
- 一次痛苦的Android应用死锁问题