Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

自定义了那么多CompatView的作用是什么? #448

Open
ForgetSky opened this issue May 26, 2021 · 1 comment
Open

自定义了那么多CompatView的作用是什么? #448

ForgetSky opened this issue May 26, 2021 · 1 comment

Comments

@ForgetSky
Copy link

No description provided.

@Veken
Copy link

Veken commented Aug 31, 2023

因为源码我们setContentView去进行xml解析的时候,也会创建很多CompactView,换肤的原理就在此,源码就是通过创建这些系统自带的view,然后添加到window上面去的,所以我们可以反射设置自己的factory2,给系统创建我们自己的自定义CompactView,在view中去监听换肤的接口,通过resource去加载皮肤包资源。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants