eclipse关联android-support-v4.jar源

作者: android_Pie | 来源:发表于2020-03-10 21:05 被阅读0次

eclipse关联android-support-v4.jar源代码

第一步:
在android项目的libs目录下创建一个文件
android-support-v4.jar.properties
第二步:在文件中编写如下代码:
src=D:\\sdk\\extras\\android\\support\\v4\src\\java
第三步:关闭本项目打开的代码
第四步:关闭本项目
第五步:重新打开本项目

关联后可以查看ViewPager或PagerAdapter源代码

public abstract class PagerAdapter {
 /**
     * Create the page for the given position.  The adapter is responsible
     * for adding the view to the container given here, although it only
     * must ensure this is done by the time it returns from
     * {@link #finishUpdate(ViewGroup)}.
     *
     * @param container The containing View in which the page will be shown.
     * @param position The page position to be instantiated.
     * @return Returns an Object representing the new page.  This does not
     * need to be a View, but can be some other container of the page.
     */
    public Object instantiateItem(ViewGroup container, int position) {
        return instantiateItem((View) container, position);
    }
}

相关文章

网友评论

    本文标题:eclipse关联android-support-v4.jar源

    本文链接:https://www.haomeiwen.com/subject/tjagdhtx.html