isViewFromObject 这是什么意思?PagerAdapter能不能讲清楚下?
public boolean isViewFromObject(View arg0, Object arg1) {
return arg0 == arg1;
} |
免责声明:本内容仅代表回答会员见解不代表天盟观点,请谨慎对待。
版权声明:作者保留权利,不代表天盟立场。
|
|
|
|
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选中的内容是不是当成一个对象来处理的意思吧。英文不好,不怎么能理解透。 |
|
|
|
|