第一部分 BASIC ANDROID UI,chapter 1 GET STARTED摘录的笔记。这一部分比较的基础。
manifest
1.The manifest is where you declare the physical hardware features your app
needs to run。Declaring these hardware features as required by your application allows the Android Market to properly filter applications based on a user’s hardware configu-ration.
2.The manifest is where you declare the permissions required by your app. Unlike
hardware requirements, all the permissions necessary to run your application must be declared in the manifest. There are no optional permissions.
3.The manifest is where you declare the icons and labels used by your application.
The most important is the top-level application element. This is what will represent your application on the device home screen and app drawer. However, the icon/label combination doesn’t just apply to the element. You can use them on the permissions element, which displays when the user accepts your application to install.
if the icon and label are set, but the activity and intent icons and labels are not set, then those elements will use the application icon and label by default.
4.Lastly, the manifest is where you declare your supported Android API versions.
targetSDKVersion:Declares the version of your application you are building against. This is what determines the features available to your app. If this differs from the minSDKVersion,you may need to use Java reflection to access APIs that are unavailable on the lower version.


It’s recommended to use XML for layouts, because it provides a good separation between UI and application logic. Folder names are used to separate layouts for different device configurations.


in the XML layout files,the xmlns:android attribute is necessary and must be declared in the top-level xml tag. this must always be present, or your resources will not build.

Even when you plan to set the text of a TextView in code,it’s a good idea to declare a default string.
that way, you can see what your layouts will look like with full text.


Each element in the layout is a view. A view is anything that can be drawn on
the screen.


It’s important to design your activities with the understanding that they can be killed at any time.


to ensure that your app is a good android citizen, always allow the user to return to a previous application if they have jumped straight into your app (for example, by pressing a notification or handling an intent created by another application). don’t force the user to back out of many screens of your app to return to their previous task.


some tools:
1.Android Asset Studio: this tool will take an uploaded image and create density-specific versions. It can also be used for creating launcher icons, menu bar icons, action bar icons and tab icons
2.LAYOUTOPT
3.DRAW9PATCH
4.hierarChY VieWer (unDown,page 27)
5.monKey: The Monkey runs a
specified number of iterations and randomly hits areas of the screen, changes the orientation of the device, presses volume and media keys, and generally just does crazy things. This is often a simple way of rooting out unexpected errors.

更多相关文章

  1. Android小程序开发--跟随手指动的绿色小球
  2. 《Android(安卓)基础(十二)》 TextInputLayout,让输入框更有灵性
  3. 解决Cordova https请求异常
  4. Android帮助文档(第二部分)开发工具
  5. android linux 基础知识总结
  6. Android(安卓)开发基础
  7. android linux 最全的基础知识总结
  8. android按钮的操作例子,简单大家看明白_基础篇
  9. 箭头函数的基础使用

随机推荐

  1. 提高 Android(安卓)代码质量的4个工具
  2. android studio 获取SHA1(指纹)
  3. Android(安卓)https ssl证书配置(使用okht
  4. Android(安卓)OpenGL ES学习笔记之绘制点
  5. 我把阿里、腾讯、字节跳动、美团等Androi
  6. Android(安卓)实现用户列表信息的功能,然
  7. 物联网温湿度显示控制项目(网页、Android
  8. Android--多线程之Handler
  9. 【Android】Android中使用JNI调用底层C++
  10. 手把手教你学Android(基础篇)