Android工程师入门(一)——这周入大门,挤时间,轻喷
2016-02-29 21:53
405 查看
挤挤时间,入个门先。
一、环境搭建
略。
二、项目结构
在studio中,项目=Module;
res:放置应用到的所有资源——基本决定了生成的APK的大小;
java:java源程序;
manifests:清单文件,所有配置的情况,每次执行的第一个访问地方;
--res
drawable:存放图片资源;
layout:布局;
menu:菜单专属布局;
mipmap:Mipmaps早在Android2.2+就可以用了,但是直到4.3 google才强烈建议使用。把图片放到mipmaps可以提高系统渲染图片的速度,提高图片质量,减少GPU压力;
values:存放字符串,主题,颜色,样式;
三、在界面中输入以及显示文字
3.1 控件概述
TextView:显示文本框控件;
EditText:输入文本框;
--常用属性
android:id——控件的id;
android:layout_width——空间的宽度;
~height;
~text——文本内容;
~textSize——文本大小;
~textColor;
~background;
EditText还多两个:~hint输入提示文本;inputType输入文本类型
3.2 实现
在layout中的main.xml中
一、环境搭建
略。
二、项目结构
在studio中,项目=Module;
res:放置应用到的所有资源——基本决定了生成的APK的大小;
java:java源程序;
manifests:清单文件,所有配置的情况,每次执行的第一个访问地方;
--res
drawable:存放图片资源;
layout:布局;
menu:菜单专属布局;
mipmap:Mipmaps早在Android2.2+就可以用了,但是直到4.3 google才强烈建议使用。把图片放到mipmaps可以提高系统渲染图片的速度,提高图片质量,减少GPU压力;
values:存放字符串,主题,颜色,样式;
三、在界面中输入以及显示文字
3.1 控件概述
TextView:显示文本框控件;
EditText:输入文本框;
--常用属性
android:id——控件的id;
android:layout_width——空间的宽度;
~height;
~text——文本内容;
~textSize——文本大小;
~textColor;
~background;
EditText还多两个:~hint输入提示文本;inputType输入文本类型
3.2 实现
在layout中的main.xml中
<!-- wrap_content:包含实际文本内容 match_parent:当前控件铺满父类容器 fill_parent:同上,针对低版本的sdk-->
<TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="match_parent" android:text="姓名:" android:textSize="28sp" android:textColor="#000000" /> <EditText android:hint="请输入你的姓名" android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="match_parent" />
相关文章推荐
- android对启动模式的深入了解
- Android 自定义View (一)
- Android 之 zygote 与进程创建
- Android 替换应用内so文件避免每次都要重新打包的麻烦
- 理解Android中的线程及线程间通信
- Setting Up the Action Bar --1.1.1
- Android Json浅析
- 【Android】15.5 例15-3—Notification的各种属性演示
- 菜鸟的Android之旅(一)
- [android] android下文件访问的权限
- Android事件机制
- 【Android】15.4 例15-2--Notification基本用法
- Android studio 中的中文乱码的问题的解决
- 全屏以按钮重写
- Android:官方下拉刷新——SwipeRefreshLayout基本使用
- Android ListView 的基本用法
- ubuntu 搭建Android开发环境
- Android SwipeActionAdapter结合Pinnedheaderlistview实现复杂列表的左右滑动操作
- Android SwipeActionAdapter结合Pinnedheaderlistview实现复杂列表的左右滑动操作
- android中网络请求库volley的使用