Android Open Source - VirginMobileMinutesChecker Minutes Bar Graph






From Project

Back to project page VirginMobileMinutesChecker.

License

The source code is released under:

Copyright 2011 Jay Goel. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Red...

If you think the Android project VirginMobileMinutesChecker listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

///**
// *//from  w  ww. j  a  v  a2s .  c o  m
// */
//package com.baker.vm.ui;
//
//import android.content.Context;
//import android.graphics.Canvas;
//import android.graphics.Color;
//import android.graphics.Paint;
//import android.graphics.RectF;
//
//import com.baker.vm.VMAccount;
//import com.jaygoel.virginminuteschecker.R;
//
///**
// * @author baker
// *
// */
//public final class MinutesBarGraph extends MinutesGraph
//{
//
//  public MinutesBarGraph(final Context context, final VMAccount account)
//  {
//    super(context, account);
//  }
//
//  @Override
//  protected void onDraw(final Canvas canvas)
//  {
//    super.onDraw(canvas);
//
//    final Paint minPaint = new Paint();
//    minPaint.setStyle(Paint.Style.FILL);
//    minPaint.setAntiAlias(true);
//    if (getDatePercent() < (getMinutesPercent() * 1.05F) &&
//      getDatePercent() > (getMinutesPercent() * .95F))
//    {
//      minPaint.setColor(getResources().getColor(R.color.warning));
//    }
//    else if (getDatePercent() < getMinutesPercent())
//    {
//      minPaint.setColor(getResources().getColor(R.color.error));
//    }
//    else
//    {
//      minPaint.setColor(getResources().getColor(R.color.info));
//    }
//    final int vertMiddle = getBottom() - getTop();
//    final RectF minRect = new RectF(getLeft() - getLeftPaddingOffset(), vertMiddle - (getHeight() / 2), getRight(), vertMiddle + (getHeight() / 2));
//
//    final int width = 20;
//    final Paint degPaint = new Paint();
//    degPaint.setColor(Color.BLACK);
//    degPaint.setStyle(Paint.Style.FILL);
//    degPaint.setAntiAlias(true);
//
//    final int degPosition = (int) (getWidth() * getDatePercent());
//    final RectF dateRect = new RectF(degPosition - (width / 2), getTop(), degPosition + (width / 2), getBottom());
//
//    canvas.drawRoundRect(minRect, 5f, 5f, minPaint);
//    canvas.drawRect(dateRect, degPaint);
//  }
//
//  @Override
//  protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec)
//  {
//    super.onMeasure(widthMeasureSpec, heightMeasureSpec);
//
//    int w = widthMeasureSpec;
//    if (MeasureSpec.getMode(widthMeasureSpec) == MeasureSpec.UNSPECIFIED)
//    {
//      w = 200;
//    }
//    int h = heightMeasureSpec;
//    if (MeasureSpec.getMode(heightMeasureSpec) == MeasureSpec.UNSPECIFIED)
//    {
//      h = 40;
//    }
//
//    setMeasuredDimension(w, h);
//  }
//}





Java Source Code List

.MinutesBarGraph.java
com.baker.vm.PreferencesUtil.java
com.baker.vm.ScraperUtil.java
com.baker.vm.UsernamePassword.java
com.baker.vm.VMAccount.java
com.baker.vm.service.NotifyRemainingMinutes.java
com.baker.vm.ui.AboutActivity.java
com.baker.vm.ui.FetchAccountTask.java
com.baker.vm.ui.MinutesGraphDrawable.java
com.baker.vm.ui.MinutesPieGraphDrawable.java
com.baker.vm.ui.MultipleAccountsActivity.java
com.baker.vm.widget.PieGraphWidget.java
com.baker.vm.widget.Simple2x1Widget.java
com.baker.vm.widget.WidgetUtil.java
com.drfloob.VirginMobileMinutesChecker.call_trigger.CallEventReceiver.java
com.drfloob.VirginMobileMinutesChecker.call_trigger.MinutesService.java
com.jaygoel.virginminuteschecker.IVMCScraper.java
com.jaygoel.virginminuteschecker.MinutesChecker.java
com.jaygoel.virginminuteschecker.Preferences.java
com.jaygoel.virginminuteschecker.ReferenceScraper.java
com.jaygoel.virginminuteschecker.UpdateService.java
com.jaygoel.virginminuteschecker.ViewMinutes.java
com.jaygoel.virginminuteschecker.WebsiteScraper.java
com.jaygoel.virginminuteschecker.Widget.java