开发者

how to open image library of Android device [closed]

开发者 https://www.devze.com 2023-02-19 02:18 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this
Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 3 years ago.

Improve this question

in my app i am 开发者_如何转开发using an Camera for an operation. i am able to open camera and i can work on it, but before opening the camera i want to have an option named Album. When i select this i want view the image stored in the android device so far that too in a grid view.

how to perform this...


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消