Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
balkarov committed Oct 29, 2017
1 parent 1774676 commit deb15ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
Expand All @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<attr name="atg_verticalPadding" format="dimension" />

<!-- Max rows -->
<attr name="atg_maxRow" format="integer" />
<attr name="atg_maxRows" format="integer" />

</declare-styleable>

Expand Down

0 comments on commit deb15ba

Please sign in to comment.