Android Open Source - 24hAnalogWidget Debug Overlay






From Project

Back to project page 24hAnalogWidget.

License

The source code is released under:

GNU General Public License

If you think the Android project 24hAnalogWidget 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

package info.staticfree.android.twentyfourhour.overlay;
/*w  w  w  . j  a  v  a  2  s .  c om*/
import java.util.Calendar;

import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public class DebugOverlay implements DialOverlay {

  private final Paint p;
  private final Paint p2;

  public DebugOverlay() {
    p = new Paint(Paint.ANTI_ALIAS_FLAG);
    p.setColor(Color.CYAN);
    p.setAlpha(127);

    p2 = new Paint(Paint.ANTI_ALIAS_FLAG);
    p2.setColor(Color.RED);
    p2.setAlpha(127);
  }

  @Override
  public void onDraw(Canvas canvas, int cX, int cY, int w, int h, Calendar calendar,
      boolean sizeChanged) {

    canvas.drawRect(cX - w / 2, cY - h / 2, cX + w / 2, cY + h / 2, p);
    canvas.drawCircle(cX, cY, 50, p2);
  }

}




Java Source Code List

info.staticfree.android.twentyfourhour.Analog24HClock.java
info.staticfree.android.twentyfourhour.AnalogClockApplication.java
info.staticfree.android.twentyfourhour.ClockUtil.java
info.staticfree.android.twentyfourhour.TwentyFourHourClockWidget3x.java
info.staticfree.android.twentyfourhour.TwentyFourHourClockWidgetResizable.java
info.staticfree.android.twentyfourhour.TwentyFourHourClockWidget.java
info.staticfree.android.twentyfourhour.WearFace.java
info.staticfree.android.twentyfourhour.WidgetDemo.java
info.staticfree.android.twentyfourhour.overlay.DateOverlay.java
info.staticfree.android.twentyfourhour.overlay.DebugOverlay.java
info.staticfree.android.twentyfourhour.overlay.DialOverlay.java
info.staticfree.android.twentyfourhour.overlay.HandsOverlay.java
info.staticfree.android.twentyfourhour.overlay.SunPositionOverlay.java
twentyfourhour.WearFaceDemoActivity.java