1
我想使用选择器,所以我不必创建一个选择器对话框。也许这是错误的构造或小部件要使用。发生的事情是,我提供的意向列表被插入到选择器对话框中,但我的设备上的所有其他应用程序也是如此。然后,如果我使用后退按钮,应用程序“结束”。如何使用Android Intent.createChooser()?
的调用是:
Intent intentChooser = Intent.createChooser(intentDocumentView, "Choose A Chapter");
Parcelable [] parcelable = new Parcelable [2];
parcelable[0] = new LabeledIntent(intentDoc0, "com.mobibob.myapp", "Title 0", 0);
parcelable[1] = new LabeledIntent(intentDoc1, "com.mobibob.myapp", "Title 1", 0);
intentChooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, parcelable);
int whichDocument = RESULT_FIRST_USER;
startActivityForResult(intentChooser, whichDocument);
我需要在intentChooser指定更多?类别?标志?演员?