Skip to content
This repository has been archived by the owner on Jan 30, 2022. It is now read-only.

updateIndicator NullPointerException #3

Closed
wants to merge 6 commits into from
Closed

updateIndicator NullPointerException #3

wants to merge 6 commits into from

Conversation

whiskeyfei
Copy link

<com.liangfeizc.slidepageindicator.CirclePageIndicator
        android:id="@+id/indicator"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginBottom="20dp"
        android:layout_marginLeft="20dp"
        android:layout_marginStart="20dp"
        android:gravity="bottom|center_horizontal"
        app:indicator_spacing="5dp"
        app:indicator_type="fraction" />
   将type设置为circle app:indicator_type="circle",首次启动的时候会出现NullPointerException crash,因为找不到mActivePosition item,所以这行代码会出错。
((ImageView) getChildAt(mActivePosition)).setImageResource(R.drawable.circle_indicator_stroke);

…lPointerException crash,因为找不到mActivePosition item,所以这行代码会出错。
@liangfeidotme
Copy link
Owner

十分感谢,能不能基于最新代码重发一下 PR ?现在代码有冲突

@whiskeyfei
Copy link
Author

抱歉环境有些问题,我重新拉个分支,github新手。。。

@whiskeyfei whiskeyfei closed this Jul 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants