com.github.gcacace.signaturepad.views.SignaturePad Java Examples

The following examples show how to use com.github.gcacace.signaturepad.views.SignaturePad. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DrawingActivity.java    From android-notepad with MIT License 6 votes vote down vote up
@Override protected void onCreate(@Nullable Bundle savedInstanceState){
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_drawing);
	DrawingActivityIntentBuilder.inject(getIntent(), this);
	ButterKnife.bind(this);
	setSupportActionBar(mToolbar);
	mToolbar.setNavigationIcon(ViewUtils.tintDrawable(R.drawable.ic_arrow_back_white_24dp, R.color.md_blue_grey_400));
	mToolbar.setNavigationOnClickListener(new View.OnClickListener(){
		@Override public void onClick(View v){
			onBackPressed();
		}
	});
	note = NotesDAO.getNote(noteId);
	Log.e(TAG, "onCreate: noteId= " + noteId + ", note= " + note);
	drawingPad.setOnSignedListener(new SignaturePad.OnSignedListener(){
		@Override public void onStartSigning(){
		}

		@Override public void onSigned(){
			hasDrawnSomething = true;
		}

		@Override public void onClear(){
		}
	});
}
 
Example #2
Source File: SignaturePadBindingAdapter.java    From android-signaturepad with Apache License 2.0 6 votes vote down vote up
@BindingAdapter(value = {"onStartSigning", "onSigned", "onClear"}, requireAll = false)
public static void setOnSignedListener(SignaturePad view, final OnStartSigningListener onStartSigningListener, final OnSignedListener onSignedListener, final OnClearListener onClearListener) {
    view.setOnSignedListener(new SignaturePad.OnSignedListener() {
        @Override
        public void onStartSigning() {
            if (onStartSigningListener != null) {
                onStartSigningListener.onStartSigning();
            }
        }

        @Override
        public void onSigned() {
            if (onSignedListener != null) {
                onSignedListener.onSigned();
            }
        }

        @Override
        public void onClear() {
            if (onClearListener != null) {
                onClearListener.onClear();
            }
        }
    });
}
 
Example #3
Source File: SaveDrawingJob.java    From android-notepad with MIT License 4 votes vote down vote up
public SaveDrawingJob(SignaturePad signaturePad, int noteId){
	super(new Params(1));
	this.signaturePad = signaturePad;
	this.noteId = noteId;
}
 
Example #4
Source File: SignaturePadBindingAdapter.java    From android-signaturepad with Apache License 2.0 4 votes vote down vote up
@BindingAdapter("onStartSigning")
public static void setOnSignedListener(SignaturePad view, final OnStartSigningListener onStartSigningListener) {
    setOnSignedListener(view, onStartSigningListener, null, null);
}
 
Example #5
Source File: SignaturePadBindingAdapter.java    From android-signaturepad with Apache License 2.0 4 votes vote down vote up
@BindingAdapter("onSigned")
public static void setOnSignedListener(SignaturePad view, final OnSignedListener onSignedListener) {
    setOnSignedListener(view, null, onSignedListener, null);
}
 
Example #6
Source File: SignaturePadBindingAdapter.java    From android-signaturepad with Apache License 2.0 4 votes vote down vote up
@BindingAdapter("onClear")
public static void setOnSignedListener(SignaturePad view, final OnClearListener onClearListener) {
    setOnSignedListener(view, null, null, onClearListener);
}