Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Commit

Permalink
Allow floats to be specified as the angle value in XML (to match Diag…
Browse files Browse the repository at this point in the history
…onalLayout.setAngle())
  • Loading branch information
Ezard committed Apr 11, 2018
1 parent bdfea5c commit 430a748
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -39,7 +39,7 @@ public class DiagonalLayoutSettings {
DiagonalLayoutSettings(Context context, AttributeSet attrs) {
TypedArray styledAttributes = context.obtainStyledAttributes(attrs, R.styleable.DiagonalLayout, 0, 0);
try {
angle = styledAttributes.getInt(R.styleable.DiagonalLayout_diagonal_angle, 0);
angle = styledAttributes.getFloat(R.styleable.DiagonalLayout_diagonal_angle, 0);
position = styledAttributes.getInt(R.styleable.DiagonalLayout_diagonal_position, BOTTOM);
handleMargins = styledAttributes.getBoolean(R.styleable.DiagonalLayout_diagonal_handleMargins, false);
direction = styledAttributes.getInt(R.styleable.DiagonalLayout_diagonal_direction, DIRECTION_LEFT);
Expand Down
2 changes: 1 addition & 1 deletion diagonallayout/src/main/res/values/attrs.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="DiagonalLayout">
<attr name="diagonal_angle" format="integer" />
<attr name="diagonal_angle" format="float" />
<attr name="diagonal_handleMargins" format="boolean"/>
<attr name="diagonal_position" format="enum">
<enum name="left" value="1" />
Expand Down

0 comments on commit 430a748

Please sign in to comment.