, 난이 팝업 있습니다. 이것은 코드는 내가 사용 : 당신은 나머지는 여전히 동일안드로이드 pick 활동 텍스트 색상
Intent pickIntent = new Intent(Intent.ACTION_CHOOSER);
사용할 필요가
:
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