Skip to content

Commit 2f81827

Browse files
committed
NullPointerException & Update README
1 parent 1430ea5 commit 2f81827

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CursorWheelLayout
22

3-
CursorWheelLayout is an Android library that allows view to be placed on a rotatable wheel. It behaves like a Circular ListView where items rotate rather than scroll vertically.
3+
CursorWheelLayout is an Android library that allows view to be placed on a rotatable wheel. It behaves like a Circular ListView where items rotate rather than scroll vertically(but without view recycle strategy).
44
CursorWheelLayout consists of two components , the center item with id `id_wheel_menu_center_item` and the menu items that provided by CycleWheelAdapter.
55

66
The CursorWheelLayout can be used as a way to select one item from a list. The `wheelSelectedAngle` attribute determines what position on the wheel is selected.
@@ -111,7 +111,7 @@ public class SimpleTextAdapter implements CursorWheelLayout.CycleWheelAdapter{
111111
* wheelCursorHeight
112112
* wheelCursorColor
113113
* wheelBackgroundColor
114-
* wheelRotateItem
114+
* wheelItemRotateMode
115115

116116

117117
## Refer to

library/src/main/java/github/hellocsl/cursorwheel/CursorWheelLayout.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ protected void dispatchDraw(Canvas canvas) {
586586
canvas.save();
587587
canvas.translate(mRootDiameter / 2f, mRootDiameter / 2f);
588588
View child = getChildAt(startIndex);
589-
if (child != null) {
589+
if (child != null && child.getTag(R.id.id_wheel_view_angle) != null) {
590590
int startAngel = (int) (((Double) child.getTag(R.id.id_wheel_view_angle) + angleDelay / 2.f) % 360);
591591
for (int i = startIndex; i < getChildCount(); i++) {
592592
canvas.save();

0 commit comments

Comments
 (0)