I was wondering if it were possible to take an image using the camera and then use that image in the background of my application. I am able to take and preview the image in my app, but don't know how to pass that data to the class that would set it as a background image. Is there a dynamic way to get this photo and set it as the background in my app?
相关问题
- Is there a limit to how many levels you can nest i
- How can I create this custom Bottom Navigation on
- How to toggle on Order in ReactJS
- Bottom Navigation View gets Shrink Down
- void before promise syntax
To start the camera intent:
Where PHOTO_ACTIVITY_REQUEST_CODE is just a integer constant unique within activity to be used as request codes while starting intent for results.
To Receive photo in the onActivityResult, and update background of the view
The above code does not use full size photo. For that, you will have to ask Photo intent to save it to a file, and read the file. Details are present here