本文整理汇总了Java中android.support.text.emoji.EmojiCompat.Config方法的典型用法代码示例。如果您正苦于以下问题:Java EmojiCompat.Config方法的具体用法?Java EmojiCompat.Config怎么用?Java EmojiCompat.Config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.text.emoji.EmojiCompat
的用法示例。
在下文中一共展示了EmojiCompat.Config方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import android.support.text.emoji.EmojiCompat; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
StethoUtil.install(this);
AppCompatDelegate.setDefaultNightMode(getSharedPreferences("settings", MODE_PRIVATE).getInt("prefDayNight", AppCompatDelegate.MODE_NIGHT_AUTO));
FontRequest fontRequest = new FontRequest(
"com.google.android.gms.fonts",
"com.google.android.gms",
"Noto Color Emoji Compat",
R.array.com_google_android_gms_fonts_certs);
EmojiCompat.Config config = new FontRequestEmojiCompatConfig(this, fontRequest);
EmojiCompat.init(config);
setupCinemaListUpdates();
}
示例2: buildConfig
import android.support.text.emoji.EmojiCompat; //导入方法依赖的package包/类
@Override
protected EmojiCompat.Config buildConfig() {
final FontRequest fontRequest = new FontRequest(
"com.google.android.gms.fonts",
"com.google.android.gms",
"Noto Color Emoji Compat",
R.array.font_certs);
FontRequestEmojiCompatConfig fontRequestEmojiCompatConfig = new FontRequestEmojiCompatConfig(context, fontRequest);
fontRequestEmojiCompatConfig.registerInitCallback(initCallback);
return fontRequestEmojiCompatConfig;
}
示例3: onOptionsItemSelected
import android.support.text.emoji.EmojiCompat; //导入方法依赖的package包/类
@Override public boolean onOptionsItemSelected(final MenuItem item) {
switch (item.getItemId()) {
case R.id.show_dialog:
MainDialog.show(this);
return true;
case R.id.variantIos:
EmojiManager.install(new IosEmojiProvider());
recreate();
return true;
case R.id.variantGoogle:
EmojiManager.install(new GoogleEmojiProvider());
recreate();
return true;
case R.id.variantTwitter:
EmojiManager.install(new TwitterEmojiProvider());
recreate();
return true;
case R.id.variantGoogleCompat:
if (emojiCompat == null) {
final EmojiCompat.Config config = new BundledEmojiCompatConfig(this);
config.setReplaceAll(true);
emojiCompat = EmojiCompat.init(config);
}
EmojiManager.install(new GoogleCompatEmojiProvider(emojiCompat));
recreate();
return true;
case R.id.variantEmojiOne:
EmojiManager.install(new EmojiOneProvider());
recreate();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
示例4: init
import android.support.text.emoji.EmojiCompat; //导入方法依赖的package包/类
public void init(boolean useBundledEmoji) {
Log.d(Config.LOGTAG, "Emojis: use integrated lib " + useBundledEmoji);
EmojiCompat.Config config = buildConfig();
config.setReplaceAll(useBundledEmoji);
EmojiCompat.reset(config);
EmojiCompat.init(config);
}
示例5: init
import android.support.text.emoji.EmojiCompat; //导入方法依赖的package包/类
public void init() {
final EmojiCompat.Config config = buildConfig();
config.setReplaceAll(true);
EmojiCompat.init(config);
}
示例6: buildConfig
import android.support.text.emoji.EmojiCompat; //导入方法依赖的package包/类
@Override
protected EmojiCompat.Config buildConfig() {
return new BundledEmojiCompatConfig(context);
}
示例7: buildConfig
import android.support.text.emoji.EmojiCompat; //导入方法依赖的package包/类
@Override
protected EmojiCompat.Config buildConfig() {
return new BundledEmojiCompatConfig(context);
}
示例8: buildConfig
import android.support.text.emoji.EmojiCompat; //导入方法依赖的package包/类
protected abstract EmojiCompat.Config buildConfig();