public static List<List<ShortcutInfo>> createShortcuts(Context context) {
List<ShortcutInfo> enabledShortcuts = new ArrayList<>();
List<ShortcutInfo> disabledShortcuts = new ArrayList<>();
enabledShortcuts.add(new ShortcutInfo.Builder(context, "ID")
.setShortLabel(context.getString(34))
.setLongLabel(context.getString(56))
.setIcon(Icon.createWithResource(context, 12))
.setDisabledMessage(context.getString(78))
.setIntents(TaskStackBuilder.create(context)
.addParentStack(ResourcesShortcutActivity.class)
.addNextIntent(new Intent(context, ResourcesShortcutActivity.class)
.setAction(Intent.ACTION_VIEW))
.getIntents())
.setRank(0)
.build());
return Arrays.asList(enabledShortcuts, disabledShortcuts);
}
ResourcesShortcutActivityGenerated.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:shortbread
作者:
评论列表
文章目录