Skip to content

Commit

Permalink
fixed attrs bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mahdi-khosravi-sh committed Oct 9, 2021
1 parent dd53615 commit aba8273
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion arrowpanel/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {

def LIB_GROUP_ID = 'com.mahdikh.vision'
def LIB_ARTIFACT_ID = 'arrowpanel'
def LIB_VERSION = '2.4.0'
def LIB_VERSION = '2.4.1'

android {
compileSdk 30
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,34 +92,34 @@ open class ArrowLayout(context: Context) : FrameLayout(context) {
for (i in 0..indexCount) {
index = a.getIndex(i)
when (index) {
R.styleable.ArrowLayout_fillColor -> {
R.styleable.ArrowLayout_ap_fillColor -> {
setFillColor(a.getColor(index, Color.WHITE))
}
R.styleable.ArrowLayout_strokeColor -> {
R.styleable.ArrowLayout_ap_strokeColor -> {
setStrokeColor(a.getColor(index, Color.WHITE))
}
R.styleable.ArrowLayout_strokeWidth -> {
R.styleable.ArrowLayout_ap_strokeWidth -> {
setStrokeWidth(a.getDimension(index, 0.0F))
}
R.styleable.ArrowLayout_arrowWidth -> {
R.styleable.ArrowLayout_ap_arrowWidth -> {
arrowWidth = a.getDimensionPixelSize(index, 20)
}
R.styleable.ArrowLayout_arrowHeight -> {
R.styleable.ArrowLayout_ap_arrowHeight -> {
arrowHeight = a.getDimensionPixelSize(index, 15)
}
R.styleable.ArrowLayout_shadowRadius -> {
R.styleable.ArrowLayout_ap_shadowRadius -> {
shadowRadius = a.getDimension(index, 10.0F)
}
R.styleable.ArrowLayout_shadowDy -> {
R.styleable.ArrowLayout_ap_shadowDy -> {
shadowDy = a.getFloat(index, 0.0F)
}
R.styleable.ArrowLayout_shadowDx -> {
R.styleable.ArrowLayout_ap_shadowDx -> {
shadowDx = a.getFloat(index, 0.0f)
}
R.styleable.ArrowLayout_shadowColor -> {
R.styleable.ArrowLayout_ap_shadowColor -> {
shadowColor = a.getColor(index, shadowColor)
}
R.styleable.ArrowLayout_cornerRadius -> {
R.styleable.ArrowLayout_ap_cornerRadius -> {
cornerRadius = a.getDimension(index, 15.0F)
}
}
Expand Down
20 changes: 10 additions & 10 deletions arrowpanel/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name="ArrowLayout">
<attr name="fillColor" format="color" />
<attr name="strokeColor" format="color" />
<attr name="shadowColor" format="color" />
<attr name="arrowWidth" format="dimension" />
<attr name="arrowHeight" format="dimension" />
<attr name="shadowDx" format="float" />
<attr name="shadowDy" format="float" />
<attr name="strokeWidth" format="dimension" />
<attr name="shadowRadius" format="dimension" />
<attr name="cornerRadius" format="dimension" />
<attr name="ap_fillColor" format="color" />
<attr name="ap_strokeColor" format="color" />
<attr name="ap_shadowColor" format="color" />
<attr name="ap_arrowWidth" format="dimension" />
<attr name="ap_arrowHeight" format="dimension" />
<attr name="ap_shadowDx" format="float" />
<attr name="ap_shadowDy" format="float" />
<attr name="ap_strokeWidth" format="dimension" />
<attr name="ap_shadowRadius" format="dimension" />
<attr name="ap_cornerRadius" format="dimension" />
</declare-styleable>
</resources>

0 comments on commit aba8273

Please sign in to comment.