use of org.thoughtcrime.securesms.keyboard.KeyboardPagerFragment in project Signal-Android by WhisperSystems.
the class MediaKeyboard method initView.
private void initView() {
if (!isInitialised) {
LayoutInflater.from(getContext()).inflate(R.layout.media_keyboard, this, true);
if (fragmentManager == null) {
FragmentActivity activity = resolveActivity(getContext());
fragmentManager = activity.getSupportFragmentManager();
}
keyboardPagerFragment = new KeyboardPagerFragment();
fragmentManager.beginTransaction().replace(R.id.media_keyboard_fragment_container, keyboardPagerFragment).commitNowAllowingStateLoss();
keyboardState = State.NORMAL;
latestKeyboardHeight = -1;
isInitialised = true;
}
}
use of org.thoughtcrime.securesms.keyboard.KeyboardPagerFragment in project Signal-Android by WhisperSystems.
the class MediaKeyboard method onCloseEmojiSearchInternal.
private void onCloseEmojiSearchInternal(boolean showAfterCommit) {
if (keyboardState == State.NORMAL) {
return;
}
keyboardState = State.NORMAL;
Fragment emojiSearch = fragmentManager.findFragmentByTag(EMOJI_SEARCH);
if (emojiSearch == null) {
return;
}
FragmentTransaction transaction = fragmentManager.beginTransaction().remove(emojiSearch).show(keyboardPagerFragment).setCustomAnimations(R.anim.fade_in, R.anim.fade_out);
if (showAfterCommit) {
transaction.runOnCommit(() -> show(latestKeyboardHeight, false));
}
transaction.commitAllowingStateLoss();
}
use of org.thoughtcrime.securesms.keyboard.KeyboardPagerFragment in project Signal-Android by signalapp.
the class MediaKeyboard method initView.
private void initView() {
if (!isInitialised) {
LayoutInflater.from(getContext()).inflate(R.layout.media_keyboard, this, true);
if (fragmentManager == null) {
FragmentActivity activity = resolveActivity(getContext());
fragmentManager = activity.getSupportFragmentManager();
}
keyboardPagerFragment = new KeyboardPagerFragment();
fragmentManager.beginTransaction().replace(R.id.media_keyboard_fragment_container, keyboardPagerFragment).commitNowAllowingStateLoss();
keyboardState = State.NORMAL;
latestKeyboardHeight = -1;
isInitialised = true;
}
}
use of org.thoughtcrime.securesms.keyboard.KeyboardPagerFragment in project Signal-Android by signalapp.
the class MediaKeyboard method onCloseEmojiSearchInternal.
private void onCloseEmojiSearchInternal(boolean showAfterCommit) {
if (keyboardState == State.NORMAL) {
return;
}
keyboardState = State.NORMAL;
Fragment emojiSearch = fragmentManager.findFragmentByTag(EMOJI_SEARCH);
if (emojiSearch == null) {
return;
}
FragmentTransaction transaction = fragmentManager.beginTransaction().remove(emojiSearch).show(keyboardPagerFragment).setCustomAnimations(R.anim.fade_in, R.anim.fade_out);
if (showAfterCommit) {
transaction.runOnCommit(() -> show(latestKeyboardHeight, false));
}
transaction.commitAllowingStateLoss();
}
Aggregations