非 xml AttributeSet 源
我目前正在研究Attributeset
的可能的自定义解决方案。为此制作包装器后,我对java.lang.classcastexception:attributesetWrapper无法施放到android.content.res.res.xmlblock $ parser
。 在Internet上进行了一些搜索之后,我意识到Android资源中的某个地方可以将attributeset的私人和最终实现铸造
(Kinda Optimization)。 在运行时添加而没有XML的情况下,添加您的属性有多现实?考虑到Android Studio某种程度上将所有这一切都付诸实践。 我知道从Android的角度来看,这不是完全正确的,但是我想探索绕过的可能性(通过反思或其他方式)。
I'm currently looking into a possible custom solution for the AttributeSet
. Having made a wrapper for it, I got an error with the java.lang.ClassCastException: AttributeSetWrapper cannot be cast to android.content.res.XmlBlock$Parser
.
Having searched a little on the Internet, I realized that somewhere in the android sources there is a cast to the private and final implementation of AttributeSet
(kinda optimization).
How realistic is it somehow to add your attributes without xml in runtime? Taking into account the fact that Android Studio somehow renders all this.
I understand that this is not quite right from the point of view of Android, but I want to explore the possibilities of bypassing (somehow through reflection or other ways).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论