Recyclerview Measure

之前写过一篇 RecyclerView 的 onMeasure 问题,但是只是看看博客,泛泛而谈,至今也没有看源码

最近遇到了一个奇怪的问题,一个 wrap_content 的 RelativeLayout 布局,放到 RecyclerView 中变成了 match_parent

Go Function Types

Function Types

A function type denotes the set of all functions with the same parameter and result types.
function 类型代表了一系列参数和返回值相同的类型

Gradle Plugin 3.0

变化

/img/in-post/gradle.png

注:compile、provided 和 apk 目前仍然可用。 不过,它们将在下一个主要版本的 Android 插件中消失

解释

  • implementation
    lib 改变时,只会编译 lib

Go Template

go 语言 Template 总结

go 语言中的 template 使用{{ }}来作为一个标识符,可以在其中插入相应的 template 支持的代码块。template 是一个模板,他所以来的数据从外部传进来。

形如:

tpl.Execute(buf, jObj.MustMap(make(map[string]interface{})))

tpl 就是我们的一个模板类,其中已经读取了我们存在本地的文件,Execute 方法传入了数据。