git subtree和submodule
git subtree 和 submodule git subtree git subtree 主要命令: git subtree add --prefix=<prefix> <commit> git subtree add --prefix=<prefix> <repository> <ref> git subtree pu...
git subtree 和 submodule git subtree git subtree 主要命令: git subtree add --prefix=<prefix> <commit> git subtree add --prefix=<prefix> <repository> <ref> git subtree pu...
Choreographer 编舞者 Choreographer 小结 使用 Choreographer 必须是在 Looper 线程 Choreographer 是线程唯一的实例,保存在 ThreadLocal Choreographer 通过 postCallbackXXX 提交任务,postCallback 提交 Runnable,postFrameCallback 提...
官方 Android 8(Android 0,API 26)及以上系统⽀持代码添加桌⾯⼩部件。调⽤ AppWidgetManager.requestPinAppWidget() 即可。 private fun requestPinAppWidget(context: Context): Boolean { //Android8以下不支持 if (Build.VERSION...
AttachInfo AttachInfo 是什么? 当 View attach 到 window 时,给 view 的一些信息,都封装在 AttachInfo;这个信息是用来在窗口处理中用的,Android 的窗口系统就是用过 AttachInfo 来判断 View 的所属窗口的 View.AttachInfo 里面的信息,就是 View 和 Window 之间的信息。每一个被添加到...
ShapeDrawable 和 GradientDrawable ShapeDrawable 和 GradientDrawable ShapeDrawable A Drawable object that draws primitive shapes. A ShapeDrawable takes a Shape object and manages its presence on...
案例 渐变案例 上下渐变,无边框,无圆角 <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" andr...
tint 和 backgroundTint 什么是 Tint 自 API21(Android L) 开始,Android SDK 引入 tint 着色器,可以随意改变安卓项目中图标或者 View 背景的颜色。 优点 一定程度上可以减少同一个样式不同颜色图标的数量,从而起到 Apk 瘦身的作用 tint 属性还可以用在 selector 中,达到选择器的效果;注意: 在使用 ...
String.format 字符串格式化 获取字符串使用 String.format(String format, Object… args) 来创建格式化的字符串 转化符说明参考表 转化符 说明 示例 %s 字符串类型 “asdf” ...
RectShape RoundRectShape RoundRectShape 原型 public RoundRectShape(@Nullable float[] outerRadii, @Nullable RectF inset, @Nullable float[] innerRadii) outerRadii 第一个和第二个都是 8 个数字数组,表示的的矩形的 4...
Webview 中 js 和 java 交互方式 传统通信 1、Java 调用 JS loadUrlJava 调用 JS,只有一种 WebView.loadUrl("javascript:function()"), evaluateJavascript Android8.0+,onAlert 只回调一次? loadUrl Html <!DOCT...