6
我有挑選性的問題,我有這個彈出:Android的選秀活動文本顏色
文本顏色爲白色,背景太。 這是代碼我使用:
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實現,請看這裏:https://github.com/android/platform_packages_apps_settings/blob/master/src/com/android/settings/ActivityPicker.java – Alex
是的,它仍然是在4.2.1中破碎。 – soundmaven
謝謝!我將執行我的對話 – jaumard