在线
客服

发布
需求

天盟
APP

天盟APP下载

关注
微信

微信扫一扫访问
顶部

isViewFromObject 这是什么意思?PagerAdapter能不能讲清楚下?

public boolean isViewFromObject(View arg0, Object arg1) {
                return arg0 == arg1;
        }

免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。

版权声明:作者保留权利,不代表天盟立场。

使用道具 举报

全部参与1

isViewFromObject(Viewview,Objectobject)
Determines whether a page View is associated with a specific key object as returned byinstantiateItem(ViewGroup, int). This method is required for a PagerAdapter to function properly.
Parameters
view :Page View to check for association withobject  
object :Object to check for association withview  
Returns
true ifviewis associated with the key objectobject
以上是官方文档解析。大概的意思就是判断适配器的某个视图页面是否需要关联一个特殊的对象并作为一个实例项目返回。
如果判断为true , 就将view 关联到一个 object 对象。
可能就是说你pagerAdapter选中的内容是不是当成一个对象来处理的意思吧。英文不好,不怎么能理解透。

使用道具 举报

发新帖
国内首家创新型IT技术需求众包服务平台,软件需求就上天盟网! 立即登录 立即注册