Android怎么学习

发布时间:2022-04-07 16:52:03 作者:iii
来源:亿速云 阅读:115

这篇文章主要介绍了Android怎么学习的相关知识,内容详细易懂,操作简单快捷,具有一定借鉴价值,相信大家阅读完这篇Android怎么学习文章都会有所收获,下面我们一起来看看吧。

第一周

Android System Architecture(Android 系统架构)

Android怎么学习
Android is an open sourceLinux-based software stack created for a wide array of devices and form factors.
Android 是一个开源的,基于Linux的用于针对不同尺寸的移动设备创建界面的软件堆栈。

系统架构:

  1. System Apps

  2. Java API Framework

  3. Native C/C++ Libraries

  4. Android Runtime

  5. Hardware Abstraction Layer(HAL)

  6. Linux Kernel

  7. Power Management

Application层: 也就是应用层,不仅包括通话短信联系人这种系统级的应用,还包括用户自己安装的一些第三方应用
Framework层:这一层大部分用Java写的,包括系统服务和四大组件
Library层:这一层大部分都是C/C++写的,主要是虚拟机,还有一些三方库比如SQLite, WebKit
HAL层:硬件抽象层,
Linux内核层:包含Linux内核和一些驱动,比如说蓝牙驱动,Camera驱动等等,这个Binder驱动也是在这一层

Android Platform

The Android platform provides a framework API that applications can use to interact with the underlying Android system.
The framework API consists of:

  1. A core set of packages and classes

  2. A set of XML elements and attributes for declaring a manifest file

  3. A set of XML elements and attributes for declaring and accessing resources

  4. A set of Intents

  5. A set of permissions that applications can request, as well as permission enforcements included in the system

Android platform 提供了一个让应用可以和底层Android系统进行交互的API框架。

Android Platform Updates

Updates to the framework API are designed so that the new API remains compatible with earlier versions of the API.

two case:

  1. Most changes in the API are additive and introduce new or replacement functionality ==>In this case, the older replaced parts are deprecated but are not removed

  2. In a very small number of cases, parts of the API may be modified or removed ==> In this case, typically such changes are only needed to ensure API robustness and application or system security

更新API框架被设计以便于新老API可以兼容。

有两种情况:

  1. 绝大多数API更新是添加或替换新功能。

  2. 极少数情况是移除或修改部分API

API Levels and Android Platform Versions

API Level

API Level ≠ Android Platform Version

Uses of API Level in Android

minSdkVersion:最小的API Level。
targetSdkVersion:目标SDK版本,建议使用最新。
compileSdkVersion:编译工程的SDK版本。不应该比targetSdkVersion低。
maxSdkVersion:最大的API Level。

第二周

An Overview of Layouts(布局概述)

Views and ViewGroups

Layout Resources(布局资源)

A layout resource defines the architecture for the UI in an Activity or a component of a UI
布局资源定义了Activity或UI组件中UI的体系结构
Android怎么学习

Several Important Classes(几个重要的类)

View Class

The View class represents the basic building block for UI components.
There are many specialized subclasses of views that act as controls or are capable of displaying text, images, or other content.

View类代表UI组件的基本构建块。
有许多专用的视图子类可以充当控件或能够显示文本,图像或其他内容。

View Class的通用属性:

  1. IDs:
    “@+id/idName” – 例如 @+id/mybutton
    “@id/idName” – 例如 @id/mybutton
    Android怎么学习

  2. android:layout_height 和 android:layout_width
    Android怎么学习
    尺寸值:
    基于屏幕物理尺寸的单位:in,mm,pt。1 in = 25.4 mm = 72 pt。他们无法在所有设备上正常运行。
    基于像素:Pixel(像素),Resolution(分辨率),Pixel Density:(像素密度 dpi)
    px,dp,sp。px = dp * (dpi / 160)
    match_parent:该视图希望与父视图一样大(减去父视图的填充,如果有的话)
    wrap_content:视图要足够大以包围其内容(考虑其自身的填充)

  3. Padding
    它定义了视图边缘和视图内容之间的空间
    android:paddingTop 上
    android:paddingBottom 下
    android:paddingLeft 左
    android:paddingRight 右
    android:paddingStart 基于ui设置
    andorid:paddingEnd 基于ui设置
    Android怎么学习

View Group Class

View Group Class包含其他视图的特殊视图
属性:

  1. Paddings and Margins
    Android怎么学习

LinearLayout

  1. android:orientation
    android:orientation=“vertical” 垂直对齐
    android:orientation=“horizontal” 水平对齐
    Android怎么学习

  2. android:gravity
    它指定对象应如何在其自身范围内在X轴和Y轴上定位其内容。
    它的值可以是以下常量值中的一个或多个(以“ |”分隔):
    Android怎么学习

TextView and Button

属性:

  1. android:textColor

  2. android:textStyle

  3. android:textSize

第三周

Introduction to Activities

Activities概念

理解活动的生命周期:
Android怎么学习

关于“Android怎么学习”这篇文章的内容就介绍到这里,感谢各位的阅读!相信大家对“Android怎么学习”知识都有一定的了解,大家如果还想学习更多知识,欢迎关注亿速云行业资讯频道。

推荐阅读:
  1. Android学习路线
  2. Android学习技巧

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

android

上一篇:Android/Linux系统怎么调用

下一篇:Android的快捷键有哪些

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》