当前位置:网站首页>RemoteViews布局和类型限制源码分析
RemoteViews布局和类型限制源码分析
2022-06-28 11:39:00 【一杯苦芥】
一、官方文档

二、类的定义

三、RemoteView注解
在RemoteViews源码中声明了如下注解:

从注解类型来看为运行时注解,作用于类或接口,结合注释可知此注解用于View的子类,用来标识该View是否可以作为远程视图使用。由此可以推断出,并非所有View都可以作为远程视图,只有声明了RemoteView注解的View才可以。
例举几个源码中的定义:




四、Filter接口

从注释中不难看出,Filter类是用来限制和过滤View的。上文提到并非所有的View都能用作远程视图,如果为上述列举的View,则onLoadClass(Class clazz)返回true,否则返回false。
在RemoteViews中,Filter接口方法的实现:

若onLoadClass(Class clazz)返回false,则抛出以下异常。

边栏推荐
- Software test interview classic + 1000 high-frequency real questions, and the hit rate of big companies is 80%
- Mutual conversion between mytipartfile and file
- Prefix and (one dimension)
- AcWing 605. Simple product (implemented in C language)
- Share the easy-to-use fastadmin open source system - practical part
- day34 js笔记 正则表达式 2021.09.29
- 【sciter】: sciter-fs模块扫描文件API的使用及其注意细节
- Leetcode 705. 设计哈希集合
- Simple understanding of ThreadLocal
- 6. calculation index
猜你喜欢

水果FL Studio/Cubase/Studio one音乐宿主软件对比

Day39 prototype chain and page Fireworks Effect 2021.10.13

For example, the visual appeal of the live broadcast of NBA Finals can be seen like this?

Web page tips this site is unsafe solution

Multi dimensional monitoring: the data base of intelligent monitoring

Web3 security serials (3) | in depth disclosure of NFT fishing process and prevention techniques

Web3安全连载(3) | 深入揭秘NFT钓鱼流程及防范技巧

SEO优化的许多好处是与流量有直接关系

Data analysis learning notes

Deployment and optimization of vsftpd service
随机推荐
2018 joint examination of nine provinces & Merging of line segment trees
Many benefits of SEO optimization are directly related to traffic
【C语言】结构体嵌套二级指针的使用
Day23 JS notes 2021.09.14
Web3安全连载(3) | 深入揭秘NFT钓鱼流程及防范技巧
Day39 prototype chain and page Fireworks Effect 2021.10.13
Random forest and poetry maker trained by AMR
来吧元宇宙,果然这热度一时半会儿过不去了
【sciter】: sciter-fs模块扫描文件API的使用及其注意细节
Using soapUI to obtain freemaker's FTL file template
Chendanqi, Fang Fei, guquanquan and Li Bo won the prize, and the list of Sloan research award in 2022 was released
fatal: unsafe repository (‘/home/anji/gopath/src/gateway‘ is owned by someone else)
QML control type: tabbar
Redis 原理 - List
Day39 prototype chain and page fireworks effect 2021.10.13
Everyone can participate in open source! Here comes the most important developer activity in dragon lizard community
Redis principle - List
Chapter 2 do you remember the point, line and surface (2)
面试步骤的面试技巧
Day37 JS note motion function 2021.10.11