If i am right what you want is to open up the gallery and view the images in it in a grid view. If this is what you are looking for following is a piece of code to do this.
Intent intent = new Intent(Intent.ACTION_PICK); intent.setType("image/*"); startActivityForResult(intent, 1);
Write the above code in the click event of the "Album" button.Above code will open up the gallery and displays the images in default grid view. Hope this helps you.
发布评论
评论(1)
如果我是对的,您想要的是打开图库并在网格视图中查看其中的图像。如果这就是您正在寻找的内容,那么下面是一段代码来执行此操作。
意图意图 = new Intent(Intent.ACTION_PICK);
intent.setType("图像/*");
startActivityForResult(意图, 1);
将以上代码写入“相册”按钮的点击事件中。以上代码将打开图库并以默认网格视图显示图像。希望这对您有帮助。
If i am right what you want is to open up the gallery and view the images in it in a grid view. If this is what you are looking for following is a piece of code to do this.
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("image/*");
startActivityForResult(intent, 1);
Write the above code in the click event of the "Album" button.Above code will open up the gallery and displays the images in default grid view. Hope this helps you.