Skip to content

Conversation

@irgendeinich
Copy link
Contributor

@irgendeinich irgendeinich commented Jul 18, 2018

Android implementation for #90, #81, #88, #85

  • Adds onDocumentSaved callback.
  • Adds onAnnotationTapped callback and disableDefaultActionForTappedAnnotations.
  • Adds onAnnotationsChanged callback.
    • added and changed event provide the full instant json, removed event provides just name and creatorName since we can't get the instant json for detached annotations.
  • Adds saveCurrentDocument which instantly saves the currently displayed document.

Copy link
Contributor

@radazzouz radazzouz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}

private static List<Object> toList(JSONArray array) throws JSONException {
List<Object> list = new ArrayList<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be already initialized at the correct size.

* Converts the given {@link JSONObject} to a {@link Map}.
*/
public static Map<String, Object> jsonObjectToMap(JSONObject object) throws JSONException {
Map<String, Object> map = new HashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be already initialized at the correct size.

this.fragmentManager = fragmentManager;
this.eventDispatcher = eventDispatcher;

pdfViewDocumentListener = new PdfViewDocumentListener(this,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the extra line break?

@irgendeinich irgendeinich merged commit e77cf10 into master Jul 24, 2018
@irgendeinich irgendeinich deleted the reinhard/android-onDocumentSaved branch July 24, 2018 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants