【发布时间】:2012-11-12 11:06:48
【问题描述】:
我的选择活动有问题,我有这个弹出窗口:
文本颜色也是白色和背景。 这是我使用的代码:
Bundle bundle = new Bundle();
ArrayList<String> shortcutNames = new ArrayList<String>();
shortcutNames.add(getString(R.string.group_applications));
bundle.putStringArrayList(Intent.EXTRA_SHORTCUT_NAME, shortcutNames);
ArrayList<ShortcutIconResource> shortcutIcons = new ArrayList<ShortcutIconResource>();
shortcutIcons.add(ShortcutIconResource.fromContext(this,
R.drawable.ic_launcher));
bundle.putParcelableArrayList(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, shortcutIcons);
Intent pickIntent = new Intent(Intent.ACTION_PICK_ACTIVITY);
pickIntent.putExtra(Intent.EXTRA_INTENT, new Intent(Intent.ACTION_CREATE_SHORTCUT));
pickIntent.putExtra(Intent.EXTRA_TITLE, getText(R.string.app_name));
pickIntent.putExtras(bundle);
startActivityForResult(pickIntent, 1);
【问题讨论】:
-
我对 Android 4.2 有同样的问题,我想我会自己实现列表。您可以从 PackageManager.queryIntentActivities() 获取项目对于 Android 实现看这里:github.com/android/platform_packages_apps_settings/blob/master/…
-
是的,它在 4.2.1 中仍然存在问题。
-
谢谢!!!我将实现我的对话框
-
我在我的应用汽车仪表板中遇到了同样的问题。在 Android 4.1 中运行良好,但 Android 4.2 在白色背景上显示相同的白色文本。
-
在 4.2.2 中仍然损坏 :(
标签: android android-intent android-activity shortcuts