Android4.0 rotate 180 by default on the interface. The recently used program view is displayed on the inverted view.

Source: Internet
Author: User

After the system rotates for 180 degrees by default, click the recently used program in the status bar and find that the view is still inverted. The trace code is modified as follows:

1>Framework/base/packages/systemui/RES/values-sw720dp/config. xml:

<Bool name ="Config_recents_thumbnail_image_fits_to_xy">False</Bool>

2>Frameworks/base/packages/systemui/src/COM/Android/systemui/recent/recentspanelview. Java:

Import Android. OS. systemproperties;// By caoyi 20130301

Private int mthumbnailwidth;
Private int mthumbnailheight;// By caoyi 20130301

Public void updatevaluesfromresources (){

Mthumbnailwidth = math. Round (res. getdimension (R. dimen. status_bar_recents_thumbnail_width ));
Mthumbnailheight = math. Round (res. getdimension (R. dimen. status_bar_recents_thumbnail_height ));// By caoyi 20130301

}

Private void updatethumbnail (viewholder H, bitmap thumbnail, Boolean show, Boolean anim ){

Else {
Matrix scalematrix = new matrix ();
Float scale = mthumbnailwidth/(float) thumbnail. getwidth ();
Scalematrix.Postscale(Scale, scale); // setscale
H. thumbnailviewimage. setscaletype (scaletype. Matrix );
H. thumbnailviewimage. setimagematrix (scalematrix );
// By caoyi 20130301
If (systemproperties. getint ("Ro. SF. hwrotation", 0) = 180 ){
Log. V (TAG, "nothing to show ");
Matrix rotatematrix = new matrix ();
Rotatematrix. setrotate (180, mthumbnailwidth/2, mthumbnailheight/2 );
H. thumbnailviewimage. setimagematrix (rotatematrix );
}
// End by caoyi 20130301
}

}

Android 180 is rotated by default on the page.

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.