package com.qoppa; import android.app.Activity; import android.os.Bundle; import com.qoppa.android.pdf.DocumentChangeListener; import com.qoppa.android.pdf.DocumentEvent; import com.qoppa.android.pdf.annotations.Annotation; import com.qoppa.notes.QPDFNotesView; public class AnnotationAddedListenerSample extends Activity implements DocumentChangeListener { public void onCreate(Bundle saveInstBundle) { super.onCreate(saveInstBundle); QPDFNotesView notesView = new QPDFNotesView(this); notesView.setActivity(this); notesView.addDocumentChangeListener(this); setContentView(notesView); } @Override public void documentChanged(DocumentEvent event) { if(event.getEventType() == DocumentEvent.ANNOTATION_ADDED) { Annotation annot = (Annotation) event.getObject(); } } }