android4.0默认界面旋转180之最近使用程序视图倒立

系统默认旋转了180度后,点击状态栏的最近使用程序,发现里面视图还是倒的。跟踪代码修改如下:

1>frameworks/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
                }

}

android4.0默认界面旋转180

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值