Skip to content

Commit

Permalink
Merge pull request maurycyw#30 from BenoitDuffez/master
Browse files Browse the repository at this point in the history
Fix a bug and add an improvement
  • Loading branch information
maurycyw committed Jun 24, 2013
2 parents 16b33cc + 98ad943 commit 1921d6e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
<declare-styleable name="StaggeredGridView">
<attr name="drawSelectorOnTop" format="boolean" />
<attr name="numColumns" format="integer" />
<attr name="itemMargin" format="dimension" />
</declare-styleable>
</resources>
</resources>
5 changes: 3 additions & 2 deletions src/com/origamilabs/library/views/StaggeredGridView.java
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ public StaggeredGridView(Context context, AttributeSet attrs, int defStyle) {
TypedArray a=getContext().obtainStyledAttributes( attrs, R.styleable.StaggeredGridView);
mColCount = a.getInteger(R.styleable.StaggeredGridView_numColumns, 2);
mDrawSelectorOnTop = a.getBoolean(R.styleable.StaggeredGridView_drawSelectorOnTop, false);
mItemMargin = (int) a.getDimension(R.styleable.StaggeredGridView_itemMargin, 0);
}else{
mColCount = 2;
mDrawSelectorOnTop = false;
Expand Down Expand Up @@ -2105,7 +2106,7 @@ private SavedState(Parcel in) {
super(in);
firstId = in.readLong();
position = in.readInt();
in.readIntArray(topOffsets);
in.createIntArray(topOffsets);
in.readTypedList(mapping, ColMap.CREATOR);

}
Expand Down Expand Up @@ -2633,4 +2634,4 @@ public void setDrawSelectorOnTop(boolean mDrawSelectorOnTop) {
}


}
}

0 comments on commit 1921d6e

Please sign in to comment.