From ed0bc77b9c7168b8c3690f018da9aef230e34c61 Mon Sep 17 00:00:00 2001 From: yy1717 <fctom1215@outlook.com> Date: 星期二, 14 一月 2020 11:17:26 +0800 Subject: [PATCH] Merge branch 'master' of https://gitee.com/endian11/DriveJudge --- app/src/main/java/safeluck/drive/evaluation/customview/ArrowView.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/app/src/main/java/safeluck/drive/evaluation/customview/ArrowView.java b/app/src/main/java/safeluck/drive/evaluation/customview/ArrowView.java index 85e3cd7..dd8262e 100644 --- a/app/src/main/java/safeluck/drive/evaluation/customview/ArrowView.java +++ b/app/src/main/java/safeluck/drive/evaluation/customview/ArrowView.java @@ -11,6 +11,7 @@ import android.util.TypedValue; import android.view.View; +import androidx.annotation.ColorRes; import androidx.annotation.Nullable; import safeluck.drive.evaluation.R; @@ -44,6 +45,7 @@ super(context, attrs, defStyleAttr); TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ArrowView,defStyleAttr,0); text = a.getString(R.styleable.ArrowView_text); + color = a.getColor(R.styleable.ArrowView_color,Color.parseColor("#99C3D1")); a.recycle(); } @@ -76,4 +78,9 @@ } return keys; } + + public void setColor( int mColor){ + this.color = mColor; + requestLayout(); + } } -- Gitblit v1.8.0