Android camera automatically returns to the camera preview page after you take a photo or video and view the image or video and delete all the content.

Source: Internet
Author: User
In jb2, take a photo/video in camera, and click the thumbnail in the lower right corner/slide to the left to view the image/video, after you click "delete" menu to delete all images/videos, the camera preview is displayed only at about 1/4 on the left of the screen. After sliding to the right, the camera preview interface is displayed. How to automatically return to the cemera preview interface after deleting all content from the "delete" menu The modification method is as follows: (1) In the gallery2 \ SRC \ com \ Android \ gallery3d \ data \ filteremptypromptset. Java file:
@ Override
Public int getmediaitemcount (){
Int itemcount = mbaseset. getmediaitemcount ();
If (itemcount> 0 ){
Return itemcount;
} Else {
Return 0; }
}
(2) In the gallery2 \ SRC \ com \ Android \ gallery3d \ app \ photodataadapter. Java file: Private class updatecontent implements callable <void> { ... Public void call () throws exception { ... If (info. size! = Msize) {
msize = info. size;
If (mcontentend> msize) mcontentend = msize;
If (mactiveend> msize) mactiveend = msize;
}< br> // M: indexhint needs to be limited to [0, msize) If (msize> 0 & info. indexhint> = msize ){
Info. indexhint = mSize-1;
}
 ... } // End call () ... }

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.