use of com.ichi2.anki.dialogs.tags.TagsDialogFactory in project Anki-Android by ankidroid.
the class AbstractFlashcardViewer method onCreate.
// ----------------------------------------------------------------------------
// ANDROID METHODS
// ----------------------------------------------------------------------------
@Override
protected void onCreate(Bundle savedInstanceState) {
Timber.d("onCreate()");
restorePreferences();
mTagsDialogFactory = new TagsDialogFactory(this).attachToActivity(this);
super.onCreate(savedInstanceState);
setContentView(getContentViewAttr(mPrefFullscreenReview));
// Make ACTION_PROCESS_TEXT for in-app searching possible on > Android 4.0
getDelegate().setHandleNativeActionModesEnabled(true);
View mainView = findViewById(android.R.id.content);
initNavigationDrawer(mainView);
mPreviousAnswerIndicator = new PreviousAnswerIndicator(findViewById(R.id.choosen_answer));
mShortAnimDuration = getResources().getInteger(android.R.integer.config_shortAnimTime);
}
use of com.ichi2.anki.dialogs.tags.TagsDialogFactory in project Anki-Android by ankidroid.
the class NoteEditor method onCreate.
// ----------------------------------------------------------------------------
// ANDROID METHODS
// ----------------------------------------------------------------------------
@Override
protected void onCreate(Bundle savedInstanceState) {
if (showedActivityFailedScreen(savedInstanceState)) {
return;
}
Timber.d("onCreate()");
mTagsDialogFactory = new TagsDialogFactory(this).attachToActivity(this);
mMediaRegistration = new MediaRegistration(this);
super.onCreate(savedInstanceState);
mFieldState.setInstanceState(savedInstanceState);
setContentView(R.layout.note_editor);
Intent intent = getIntent();
if (savedInstanceState != null) {
mCaller = savedInstanceState.getInt("caller");
mAddNote = savedInstanceState.getBoolean("addNote");
mCurrentDid = savedInstanceState.getLong("did");
mSelectedTags = savedInstanceState.getStringArrayList("tags");
mReloadRequired = savedInstanceState.getBoolean("reloadRequired");
mPastedImageCache = (HashMap<String, String>) savedInstanceState.getSerializable("imageCache");
mToggleStickyText = (HashMap<Integer, String>) savedInstanceState.getSerializable("toggleSticky");
mChanged = savedInstanceState.getBoolean("changed");
} else {
mCaller = intent.getIntExtra(EXTRA_CALLER, CALLER_NOCALLER);
if (mCaller == CALLER_NOCALLER) {
String action = intent.getAction();
if ((ACTION_CREATE_FLASHCARD.equals(action) || ACTION_CREATE_FLASHCARD_SEND.equals(action) || ACTION_PROCESS_TEXT.equals(action))) {
mCaller = CALLER_CARDEDITOR_INTENT_ADD;
}
}
}
startLoadingCollection();
mOnboarding.onCreate();
}
Aggregations