/**
   * Initialize with standard view layout information and style. Sets the base to the current time.
   */
  public Chronometer(Context context, AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);

    TypedArray a =
        context.obtainStyledAttributes(
            attrs, com.android.internal.R.styleable.Chronometer, defStyle, 0);
    setFormat(a.getString(com.android.internal.R.styleable.Chronometer_format));
    a.recycle();

    init();
  }
Ejemplo n.º 2
0
 public void onClick(View v) {
   mChronometer.setFormat(null);
 }
Ejemplo n.º 3
0
 public void onClick(View v) {
   mChronometer.setFormat("Formatted time (%s)");
 }