About Android MTK camera L version, after switching the screen scale, the resolution changes, but the original resolution is no longer valid after re-entering the camera.

Source: Internet
Author: User

Bug Details: For example, 4:3 is 200W, cut into full-screen 400W, re-cut back to 4:3 300W, after exiting the camera, re-enter and become 200W.

Cause Analysis: This version of the design, when you click on the screen scale, the program is to take this scale value as the main attribute, through the sharepreference (write file operation, the file data content is actually a key value pair) to write files, The resolution is used as a secondary property to find the appropriate value through the Find () method, but this resolution is not written into sharepreference, so re-enter or read the original file value.

Modification method:commonrule. java

public void execute () {
Mconditionsetting =Msettinggenerator.getsettingitem (Mconditionkey);
mresultsetting = Msettinggenerator.getsettingitem (string conditionsettingvalue = mconditionsetting.getvalue ();
int index = conditionsatisfied (conditionsettingvalue);
string resultvalue = mresultsetting.getvalue ();
int type = mresultsetting.gettype ();

.......

.......

if (mresultsetting.isenable ()) {
Setresultsettingvalue (type,Resultvalue,Overridevalue,true);
}

if (Mconditionkey.equals (settingconstants.key_picture_ratio)) {
//Add the following code
listpreferencepref =null;
pref =mresultsetting.getlistpreference ();
Sharedpreferences.editoreditor =Pref.getsharedpreferences (settingconstants.key_picture_size).edit ();
Editor.putstring (settingconstants.Key_picture_size,resultvalue);
Editor.apply ();
//Add as above code
return;
}
record record = mresultsetting. new Record ( resultvalue, Overridevalue);
mresultsetting.addoverriderecord ( record);

}

About Android MTK camera L version, after switching the screen scale, the resolution changes, but the original resolution is no longer valid after re-entering the camera

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.