美文网首页
LayoutInflater简单认识

LayoutInflater简单认识

作者: bogerLiu | 来源:发表于2020-09-22 17:49 被阅读0次

LayouInflater简单认识

getSystemService

getSystemServiceName

这里是通过 static hashmap实现单例

通过map查找到 唯一实例PhoneLayoutInflater

activity phoneWindow

setContentView 调用PhoneWindow的setContentView 内部是LayoutInflater 调用phoneLayoutInflater 遍历循环调用创建View 主要是oncreateViewFromTag来创建View 并添加到View的父容器内,addView(view,layoutParams);

相关文章

网友评论

      本文标题:LayoutInflater简单认识

      本文链接:https://www.haomeiwen.com/subject/lgzwyktx.html