Skip to content

Commit

Permalink
NullPointerException & Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
BCsl committed Jan 23, 2017
1 parent 1430ea5 commit 2f81827
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CursorWheelLayout

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.
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).
CursorWheelLayout consists of two components , the center item with id `id_wheel_menu_center_item` and the menu items that provided by CycleWheelAdapter.

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.
Expand Down Expand Up @@ -111,7 +111,7 @@ public class SimpleTextAdapter implements CursorWheelLayout.CycleWheelAdapter{
* wheelCursorHeight
* wheelCursorColor
* wheelBackgroundColor
* wheelRotateItem
* wheelItemRotateMode


## Refer to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ protected void dispatchDraw(Canvas canvas) {
canvas.save();
canvas.translate(mRootDiameter / 2f, mRootDiameter / 2f);
View child = getChildAt(startIndex);
if (child != null) {
if (child != null && child.getTag(R.id.id_wheel_view_angle) != null) {
int startAngel = (int) (((Double) child.getTag(R.id.id_wheel_view_angle) + angleDelay / 2.f) % 360);
for (int i = startIndex; i < getChildCount(); i++) {
canvas.save();
Expand Down

0 comments on commit 2f81827

Please sign in to comment.