打开Whatsapp新组页面,点击该组图标,底部显示,它显示已安装的相机/图标相关选项列表。我的问题是我们如何编写这些权限(如果我们写)添加那些相机/图标相关的选项在我们的应用程序我想添加一个类似的底部表格。
答案 0 :(得分:0)
您无需创建底部工作表,因为您可以从选配器意图中获得相同的功能。
//Create an intent
final Intent galleryIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
galleryIntent.setType("image/*");
//Create any other intents you want
final Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
//Add them to an intent array
Intent[] intents = new Intent[]{cameraIntent};
//Create a choose from your first intent then pass in the intent array
final Intent chooserIntent = Intent.createChooser(galleryIntent, "Choose icon");
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, intents);
startActivityForResult(chooserIntent, 101);
您需要通过覆盖onActivityResult来捕获输入。