Sign

public class Sign extends View implements IFormControl

A special control for create sign picture.

Fields

CLEAR_BUFF_DP

protected final int CLEAR_BUFF_DP

CLEAR_IMAGE_SIZE_DP

protected final int CLEAR_IMAGE_SIZE_DP

SIGN_FILE

public static final String SIGN_FILE

TOUCH_TOLERANCE

protected static final float TOUCH_TOLERANCE

mCleanImage

protected Drawable mCleanImage

mClearBuff

protected int mClearBuff

mClearImageSize

protected int mClearImageSize

mNotInitialized

protected boolean mNotInitialized

mPaint

protected Paint mPaint

mPath

protected Path mPath

mPaths

protected final LinkedList<Path> mPaths

mPreviousSign

protected File mPreviousSign

mPreviousSignBitmap

protected Bitmap mPreviousSignBitmap

mPreviousSignPath

protected String mPreviousSignPath

mX

protected float mX

Constructors

Sign

public Sign(Context context)

Sign

public Sign(Context context, AttributeSet attrs)

Sign

public Sign(Context context, AttributeSet attrs, int defStyleAttr)

Sign

public Sign(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes)

Methods

addToLayout

public void addToLayout(ViewGroup layout)

drawSign

protected void drawSign(Canvas canvas, int bkColor, Paint paint)

getFieldName

public String getFieldName()

getValue

public Object getValue()

init

protected void init()

init

public void init(JSONObject element, List<Field> fields, Bundle savedState, Cursor featureCursor, SharedPreferences lastValue)

isShowLast

public boolean isShowLast()

onDraw

protected void onDraw(Canvas canvas)

onSizeChanged

protected void onSizeChanged(int w, int h, int oldw, int oldh)

onTouchEvent

public boolean onTouchEvent(MotionEvent event)

save

public void save(int width, int height, boolean transparentBackground, File sigFile)

saveLastValue

public void saveLastValue(SharedPreferences preferences)

saveState

public void saveState(Bundle outState)

setPath

public void setPath(String path)

touchMove

protected void touchMove(float x, float y)

touchStart

protected void touchStart(float x, float y)

touchUp

protected void touchUp()