Commits

Luis Alberto Pérez García committed 9520c91

Removes the hardcoded '$' char in BarGraph.

  • Participants
  • Parent commits 20f0c64

Comments (0)

Files changed (1)

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

 
 import java.util.ArrayList;
 
-import com.echo.holographlibrary.PieGraph.OnSliceClickedListener;
-
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap.Config;
 import android.graphics.Color;
 import android.graphics.Paint;
 import android.graphics.Path;
-import android.graphics.PixelFormat;
 import android.graphics.Point;
 import android.graphics.Rect;
 import android.graphics.RectF;
 import android.graphics.drawable.NinePatchDrawable;
 import android.util.AttributeSet;
 import android.view.MotionEvent;
-import android.view.SurfaceHolder;
-import android.view.SurfaceView;
 import android.view.View;
 
 public class BarGraph extends View {
                     this.p.setTextSize(40);
                     this.p.setColor(Color.WHITE);
                     Rect r2 = new Rect();
-                    this.p.getTextBounds("$"+p.getValue(), 0, 1, r2);
-                    popup.setBounds((int)(((r.left+r.right)/2)-(this.p.measureText("$"+p.getValue())/2))-14, r.top+(r2.top-r2.bottom)-26, (int)(((r.left+r.right)/2)+(this.p.measureText("$"+p.getValue())/2))+14, r.top);
+                    this.p.getTextBounds(String.valueOf(p.getValue()), 0, 1, r2);
+                    popup.setBounds((int)(((r.left+r.right)/2)-(this.p.measureText(String.valueOf(p.getValue()))/2))-14, r.top+(r2.top-r2.bottom)-26, (int)(((r.left+r.right)/2)+(this.p.measureText(String.valueOf(p.getValue()))/2))+14, r.top);
                     popup.draw(canvas);
-                    canvas.drawText("$"+p.getValue(), (int)(((r.left+r.right)/2)-(this.p.measureText("$"+p.getValue())/2)), r.top-20, this.p);
+                    canvas.drawText(String.valueOf(p.getValue()), (int)(((r.left+r.right)/2)-(this.p.measureText(String.valueOf(p.getValue()))/2)), r.top-20, this.p);
                 }
                 if (indexSelected == count && listener != null) {
                     this.p.setColor(Color.parseColor("#33B5E5"));