首页
Java
登录
6mi
u
盘
搜
搜 索
Java
Activity获取setContentView()后得到的View
Activity获取setContentView()后得到的View
xiaoxiao
2021-02-28
101
1、获取setContentView()后得到的View:
View contentView = ((ViewGroup) (getWindow()
.getDecorView
()
.findViewById
(android
.R
.id
.content
)))
.getChildAt
(
0
)
;
2、获取DecView:
View rootView
=
getWindow().getDecorView();
转载请注明原文地址: https://www.6miu.com/read-46190.html
技术
最新回复
(
0
)