Migration 1.x to 2.x version
This document is intended to highlight the main changes from the previous 1.x version and the 2.0 version. For more information, please refer to the javadoc included in the SDK distribution file.
First Change
Now you can customize MobbSignView passing a Dictionary to the constructor:
NOW (2.0)
Dictionary<string, object> customizationDict = new Dictionary<string, object>();
customizationDict.Add(MobbSignView.BOTTOMBAR_SHOWING, true);
customizationDict.Add(MobbSignView.TOPBAR_BACKGROUND_COLOR, Colors.Transparent);
customizationDict.Add(MobbSignView.BACKBTN_SHOWING, true);
this.MobbSignView = new MobbSignView(customizationDict);
The valid key/objectType pairs for the customization dictionary are the following:
- TITLE_TEXT -> (String) - title text.
- TITLE_FOREGROUND_COLOR -> (Color) - title foreground color.
- TOPBAR_SHOWING -> (bool) - BOOL value indicating in top bar should be hidden (false) or shown (true).
- TOPBAR_BACKGROUND_COLOR -> (Color) - top bar background color.
- BOTTOMBAR_SHOWING -> (bool) - BOOL value indicating in bottom bar should be hidden (false) or shown (true).
- BOTTOMBAR_BACKGROUND_COLOR -> (Color) - bottom bar background color.
- CONFIRMBTN_FOREGROUND_COLOR -> (Color) - confirm button foreground color.
- CONFIRMBTN_IMAGE -> (IconElement) - confirm button image.
- CONFIRMBTN_TEXT -> (String) - confirm button text.
- DONEBTN_FOREGROUND_COLOR -> (Color) - done button foreground color.
- DONEBTN_IMAGE -> (IconElement) - done button image.
- DONEBTN_TEXT -> (String) - done button text.
- SAVEBTN_FOREGROUND_COLOR -> (Color) - save button foreground color.
- SAVEBTN_IMAGE -> (IconElement) - save button image.
- SAVEBTN_TEXT -> (String) - save button text.
- BACKBTN_SHOWING -> (bool) - BOOL value indicating if back button should be hidden (false) or shown (true).
- BACKBTN_FOREGROUND_COLOR -> (Color) - back button foreground color.
- BACKBTN_IMAGE -> (IconElement) - back button image.
- BACKBTN_TEXT -> (String) - back button text.
- SIGNBTN_FOREGROUND_COLOR -> (Color) - sign button foreground color.
- SIGNBTN_IMAGE -> (IconElement) - sign button image.
- SIGNBTN_TEXT -> (String) - sign button text.
- ZOOMINBTN_FOREGROUND_COLOR -> (Color) - zoom in button foreground color.
- ZOOMINBTN_IMAGE -> (IconElement) - zoom in button image.
- ZOOMINBTN_TEXT -> (String) - zoom in button text.
- ZOOMOUTBTN_FOREGROUND_IMAGE -> (Color) - zoom out button foreground image.
- ZOOMOUTBTN_IMAGE -> (IconElement) - zoom out button image.
- ZOOMOUTBTN_TEXT -> (String) - zoom out button text.
- PREVPAGEBTN_FOREGROUND_COLOR -> (Color) - previous page button foreground color.
- PREVPAGEBTN_IMAGE -> (IconElement) - previous page button image.
- PREVPAGEBTN_TEXT -> (String) - previous page button text.
- NEXTPAGEBTN_FOREGROUND_COLOR -> (Color) - next page button foreground color.
- NEXTPAGEBTN_IMAGE -> (IconElement) - next page button image.
- NEXTPAGEBTN_TEXT -> (String) - next page button text.
- REMOVEBTN_FOREGROUND_COLOR -> (Color) - remove button foreground color.
- REMOVEBTN_IMAGE -> (IconElement) - remove button image.
- REMOVEBTN_TEXT -> (String) - remove button text.
- SIGNATURE_STROKE_COLOR -> (Color) - color of the signature stroke
- SIGNATURE_STROKE_WIDTH -> (Integer) - width of the signature stroke (from 1 to 10).
- SIGNATURE_CAPTURE_BORDER_COLOR -> (Color) - color of the border of the capture rectangle over the signature.
- SIGNATURE_CAPTURE_FILL_COLOR -> (Color) - color of the capture rectangle over the signature.
- SIGNATURE_CAPTURE_BORDER_WIDTH -> (Integer) - width of the border of the capture rectangle over the signature (from 1 to 10).
- SIGNATURE_CAPTURE_NUMBER -> (Integer) max number of signatures to capture with the view. -1 is equal to indeterminate.
Second Change
The callback methods of the progress updater has been separated and now each method has its own event handler.
BEFORE (1.4.x)
MobbSignView.progressUpdater = new MyMobbSignProgressUpdater(this);
NOW (2.0)
this.MobbSignView.OnDocumentShown += MobbSignView_OnDocumentShown;
this.MobbSignView.OnSignatureAcquised += MobbSignView_OnSignatureAcquised;
this.MobbSignView.OnSignatureDeleted += MobbSignView_OnSignatureDeleted;
this.MobbSignView.OnDocumentSigned += MobbSignView_OnDocumentSigned;
this.MobbSignView.OnErrorOccurred += MobbSignView_OnErrorOccurred;
this.MobbSignView.OnProcessEnd += MobbSignView_OnProcessEnd;
this.MobbSignView.OnBackButtonPressed += MobbSignView_OnBackButtonPressed;
this.MobbSignView.OnSignButtonPressed += MobbSignView_OnSignButtonPressed;