use of com.orgzly.android.usecase.BookImportFromUri in project orgzly-android by orgzly.
the class MainActivity method onSimpleOneLinerDialogValue.
// TODO: Implement handlers when dialog is created
@Override
public void onSimpleOneLinerDialogValue(int id, String value, Bundle userData) {
switch(id) {
case DIALOG_NEW_BOOK:
mSyncFragment.run(new BookCreate(value));
break;
case DIALOG_IMPORT_BOOK:
Uri uri = Uri.parse(userData.getString("uri"));
/* We are assuming it's an Org file. */
mSyncFragment.run(new BookImportFromUri(value, BookFormat.ORG, uri));
break;
}
}
Aggregations