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指定更多?類別?標誌?演員?