/** * 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(); }
public void onClick(View v) { mChronometer.setFormat(null); }
public void onClick(View v) { mChronometer.setFormat("Formatted time (%s)"); }