Commits

ChaYoung You committed 158b0b0

Add mValueColor to Bar

Comments (0)

Files changed (2)

HoloGraphLibrary/src/com/echo/holographlibrary/Bar.java

 
 package com.echo.holographlibrary;
 
+import android.graphics.Color;
 import android.graphics.Path;
 import android.graphics.Region;
 
     private int mColor = 0xFF33B5E5;
     private int mLabelColor = -1;
     private int mSelectedColor = -1;
+    private int mValueColor = Color.WHITE;
     private String mName = null;
     private float mValue;
     private String mValueString = null;
         mSelectedColor = selectedColor;
     }
 
+    public int getValueColor() {
+        return mValueColor;
+    }
+
+    public void setValueColor(int valueColor) {
+        mValueColor = valueColor;
+    }
+
     public String getName() {
         return (null == mName) ? "" : mName;
     }

HoloGraphLibrary/src/com/echo/holographlibrary/BarGraph.java

             if (mShowBarText) {
                 this.mPaint.setTextSize(VALUE_FONT_SIZE
                         * resources.getDisplayMetrics().scaledDensity);
-                this.mPaint.setColor(Color.WHITE);
+                this.mPaint.setColor(bar.getValueColor());
                 this.mPaint.getTextBounds(bar.getValueString(), 0, 1, mTextRect);
 
                 int boundLeft = (int) (((mBoundsRect.left + mBoundsRect.right) / 2)