diff --git a/library/src/main/java/me/gujun/android/taggroup/TagGroup.java b/library/src/main/java/me/gujun/android/taggroup/TagGroup.java index 833b135..ae8bfca 100644 --- a/library/src/main/java/me/gujun/android/taggroup/TagGroup.java +++ b/library/src/main/java/me/gujun/android/taggroup/TagGroup.java @@ -67,7 +67,6 @@ public class TagGroup extends ViewGroup { private final float default_vertical_spacing; private final float default_horizontal_padding; private final float default_vertical_padding; - private final int default_max_rows; /** * Indicates whether this TagGroup is set up to APPEND mode or DISPLAY mode. Default is false. @@ -197,7 +196,6 @@ public TagGroup(Context context, AttributeSet attrs, int defStyleAttr) { default_vertical_spacing = dp2px(4.0f); default_horizontal_padding = dp2px(12.0f); default_vertical_padding = dp2px(3.0f); - default_max_rows = 1; // Load styled attributes. final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TagGroup, defStyleAttr, R.style.TagGroup); @@ -221,7 +219,7 @@ public TagGroup(Context context, AttributeSet attrs, int defStyleAttr) { verticalSpacing = (int) a.getDimension(R.styleable.TagGroup_atg_verticalSpacing, default_vertical_spacing); horizontalPadding = (int) a.getDimension(R.styleable.TagGroup_atg_horizontalPadding, default_horizontal_padding); verticalPadding = (int) a.getDimension(R.styleable.TagGroup_atg_verticalPadding, default_vertical_padding); - maxRows = (int) a.getDimension(R.styleable.TagGroup_atg_maxRow, default_max_rows); + maxRows = (int) a.getInt(R.styleable.TagGroup_atg_maxRows, Integer.MAX_VALUE); } finally { a.recycle(); } diff --git a/library/src/main/res/values/attrs.xml b/library/src/main/res/values/attrs.xml index 54acbfb..7db8f18 100644 --- a/library/src/main/res/values/attrs.xml +++ b/library/src/main/res/values/attrs.xml @@ -42,7 +42,7 @@ - +