Commits

Gonzalo Rodríguez Píriz committed da12886

Changed the thickness attribute of the Pie Chart so that it looks the same on different screen densities (it looked really thick on mdpi).

  • Participants
  • Parent commits 3bd1504

Comments (0)

Files changed (1)

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

 	private Path path = new Path();
 	
 	private int indexSelected = -1;
-	private int thickness = 50;
+	private int thickness;
 	private OnSliceClickedListener listener;
 	
 	private boolean drawCompleted = false;
 	
 	public PieGraph(Context context) {
 		super(context);
+		thickness = (int) (25f * context.getResources().getDisplayMetrics().density);
 	}
+	
 	public PieGraph(Context context, AttributeSet attrs) {
 		super(context, attrs);
+		thickness = (int) (25f * context.getResources().getDisplayMetrics().density);
 	}
 	
 	public void onDraw(Canvas canvas) {