本文整理汇总了Java中org.thoughtcrime.securesms.util.TextSecurePreferences.isSystemEmojiPreferred方法的典型用法代码示例。如果您正苦于以下问题:Java TextSecurePreferences.isSystemEmojiPreferred方法的具体用法?Java TextSecurePreferences.isSystemEmojiPreferred怎么用?Java TextSecurePreferences.isSystemEmojiPreferred使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.thoughtcrime.securesms.util.TextSecurePreferences
的用法示例。
在下文中一共展示了TextSecurePreferences.isSystemEmojiPreferred方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setTransport
import org.thoughtcrime.securesms.util.TextSecurePreferences; //导入方法依赖的package包/类
public void setTransport(TransportOption transport) {
final boolean useSystemEmoji = TextSecurePreferences.isSystemEmojiPreferred(getContext());
int imeOptions = (getImeOptions() & ~EditorInfo.IME_MASK_ACTION) | EditorInfo.IME_ACTION_SEND;
int inputType = getInputType();
if (isLandscape()) setImeActionLabel(transport.getComposeHint(), EditorInfo.IME_ACTION_SEND);
else setImeActionLabel(null, 0);
if (useSystemEmoji) {
inputType = (inputType & ~InputType.TYPE_MASK_VARIATION) | InputType.TYPE_TEXT_VARIATION_SHORT_MESSAGE;
}
setInputType(inputType);
setImeOptions(imeOptions);
setHint(transport.getComposeHint(),
transport.getSimName().isPresent()
? getContext().getString(R.string.conversation_activity__from_sim_name, transport.getSimName().get())
: null);
}
示例2: onFinishInflate
import org.thoughtcrime.securesms.util.TextSecurePreferences; //导入方法依赖的package包/类
@Override
public void onFinishInflate() {
super.onFinishInflate();
this.emojiToggle = ViewUtil.findById(this, R.id.emoji_toggle);
this.composeText = ViewUtil.findById(this, R.id.embedded_text_editor);
this.quickCameraToggle = ViewUtil.findById(this, R.id.quick_camera_toggle);
this.quickAudioToggle = ViewUtil.findById(this, R.id.quick_audio_toggle);
this.buttonToggle = ViewUtil.findById(this, R.id.button_toggle);
this.recordingContainer = ViewUtil.findById(this, R.id.recording_container);
this.recordTime = new RecordTime((TextView) ViewUtil.findById(this, R.id.record_time));
this.slideToCancel = new SlideToCancel(ViewUtil.findById(this, R.id.slide_to_cancel));
this.microphoneRecorderView = ViewUtil.findById(this, R.id.recorder_view);
this.microphoneRecorderView.setListener(this);
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) {
this.microphoneRecorderView.setVisibility(View.GONE);
this.microphoneRecorderView.setClickable(false);
}
if (TextSecurePreferences.isSystemEmojiPreferred(getContext())) {
emojiToggle.setVisibility(View.GONE);
emojiVisible = false;
} else {
emojiToggle.setVisibility(View.VISIBLE);
emojiVisible = true;
}
}
示例3: useSystemEmoji
import org.thoughtcrime.securesms.util.TextSecurePreferences; //导入方法依赖的package包/类
private boolean useSystemEmoji() {
return TextSecurePreferences.isSystemEmojiPreferred(getContext());
}
示例4: EmojiEditText
import org.thoughtcrime.securesms.util.TextSecurePreferences; //导入方法依赖的package包/类
public EmojiEditText(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
if (!TextSecurePreferences.isSystemEmojiPreferred(getContext())) {
setFilters(appendEmojiFilter(this.getFilters()));
}
}