
Android-相关概念
文章平均质量分 84
holamP
Problems are not stop signs, they are guidelines.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
注解一:
@DocumentedIndicates that annotations with a type are to be documented by javadoc and similar tools by default. This type should be used to annotate the declarations of types whose annotations affect...原创 2021-02-26 12:03:38 · 186 阅读 · 0 评论 -
动态代理
一:什么是动态代理?代理类在程序运行前不存在、运行时由程序动态生成的代理方式称为动态代理。二:作用:在运行时刻动态生成代理类,可以方便对代理类的函数做统一或特殊处理而不用像静态代理方式那样需要修改每个函数。三:如何实现:1.新建委托类。 public interface Delegation { void delegationMethod1()原创 2017-09-13 10:36:47 · 180 阅读 · 0 评论 -
volatile
1、定义官方解释:A field may be declared volatile, in which case the Java Memory Model ensures that all threads see a consistent value for the variable.翻译:一个字段可以被声明为volatile,在这种情况下,Java内存模型确保所有线程都能看到...原创 2018-05-22 11:30:35 · 115 阅读 · 0 评论 -
屏幕适配一 (概念)
术语和概念屏幕尺寸按屏幕对角测量的实际物理尺寸。为简便起见,Android 将所有实际屏幕尺寸分组为四种通用尺寸:小、 正常、大和超大。屏幕密度屏幕物理区域中的像素量;通常称为 dpi(每英寸 点数)。例如, 与“正常”或“高”密度 屏幕相比,“低”密度屏幕在给定物理区域的像素较少。为简便起见,Android 将所有屏幕密度分组为六种通用密度: 低、中、高、超高、超超高 ...翻译 2018-07-18 15:58:06 · 261 阅读 · 0 评论 -
屏幕适配二 (概念2)
如何支持多种屏幕确保应用布局:适应小屏幕(让用户能实际使用您的应用)已针对大屏幕优化,可以利用其他屏幕空间已同时针对横屏和竖屏方向优化屏幕尺寸的新配置限定符 (在 Android 3.2 中引入)。屏幕配置 smallestWidth限定符值 swdp示例: sw600dp sw720dp说明: 屏幕的基本尺寸,由可用屏幕区域的最小尺寸指...翻译 2018-07-18 16:36:03 · 193 阅读 · 0 评论 -
屏幕适配三 (使用)
支持多种屏幕的目标是创建一款在 Android 系统支持的通用屏幕尺寸上都可以 正常运行且显示良好的应用。使用“wrap_content”和“match_parent”为确保您的布局能够灵活地适应不同的屏幕尺寸,您应该为某些视图组件的宽度和高度使用 “wrap_content” 和 “match_parent”。 如果您使用 “wrap_content”,视图的宽度或高度将设置为使内容...翻译 2018-07-18 17:18:02 · 184 阅读 · 0 评论 -
clone()说明和使用
/**... * Invoking Object's clone method on an instance that does not * implement the <code>Cloneable</code> interface results in the * exception * <code>CloneNotSupportedEx...原创 2018-07-21 00:47:12 · 376 阅读 · 0 评论