Merge "Reduce height of recent app thumbnails"
This commit is contained in:
committed by
Android (Google) Code Review
commit
30433b83cc
@@ -30,7 +30,7 @@
|
||||
|
||||
<!-- Size of application thumbnail -->
|
||||
<dimen name="status_bar_recents_thumbnail_width">164dp</dimen>
|
||||
<dimen name="status_bar_recents_thumbnail_height">164dp</dimen>
|
||||
<dimen name="status_bar_recents_thumbnail_height">145dp</dimen>
|
||||
|
||||
<!-- Size of application label text -->
|
||||
<dimen name="status_bar_recents_app_label_text_size">16dip</dimen>
|
||||
|
||||
@@ -60,6 +60,7 @@ import android.widget.RelativeLayout;
|
||||
import android.widget.ScrollView;
|
||||
import android.widget.TextView;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import android.widget.ImageView.ScaleType;
|
||||
|
||||
import com.android.systemui.R;
|
||||
import com.android.systemui.statusbar.StatusBar;
|
||||
@@ -556,7 +557,7 @@ public class RecentsPanelView extends RelativeLayout
|
||||
if (v.getTag() instanceof ViewHolder) {
|
||||
ViewHolder h = (ViewHolder)v.getTag();
|
||||
if (h.activityDescription == ad) {
|
||||
if (DEBUG) Log.v(TAG, "Updatating thumbnail #" + index + " in "
|
||||
if (DEBUG) Log.v(TAG, "Updating thumbnail #" + index + " in "
|
||||
+ h.activityDescription
|
||||
+ ": " + ad.getThumbnail());
|
||||
h.iconView.setImageDrawable(ad.getIcon());
|
||||
@@ -578,6 +579,15 @@ public class RecentsPanelView extends RelativeLayout
|
||||
// that this now covers, to improve scrolling speed.
|
||||
// That can't be done until the anim is complete though.
|
||||
h.thumbnailViewImage.setImageBitmap(thumbnail);
|
||||
|
||||
// scale to fill up the full width
|
||||
Matrix scaleMatrix = new Matrix();
|
||||
float thumbnailViewWidth = h.thumbnailViewImage.getWidth();
|
||||
float scale = thumbnailViewWidth / thumbnail.getWidth();
|
||||
scaleMatrix.setScale(scale, scale);
|
||||
h.thumbnailViewImage.setScaleType(ScaleType.MATRIX);
|
||||
h.thumbnailViewImage.setImageMatrix(scaleMatrix);
|
||||
|
||||
if (anim) {
|
||||
h.thumbnailViewImage.setAnimation(AnimationUtils.loadAnimation(
|
||||
mContext, R.anim.recent_appear));
|
||||
|
||||
Reference in New Issue
Block a user