6060import android .widget .ScrollView ;
6161import android .widget .TextView ;
6262import android .widget .AdapterView .OnItemClickListener ;
63+ import android .widget .ImageView .ScaleType ;
6364
6465import com .android .systemui .R ;
6566import com .android .systemui .statusbar .StatusBar ;
@@ -556,7 +557,7 @@ void applyActivityDescription(ActivityDescription ad, int index, boolean anim) {
556557 if (v .getTag () instanceof ViewHolder ) {
557558 ViewHolder h = (ViewHolder )v .getTag ();
558559 if (h .activityDescription == ad ) {
559- if (DEBUG ) Log .v (TAG , "Updatating thumbnail #" + index + " in "
560+ if (DEBUG ) Log .v (TAG , "Updating thumbnail #" + index + " in "
560561 + h .activityDescription
561562 + ": " + ad .getThumbnail ());
562563 h .iconView .setImageDrawable (ad .getIcon ());
@@ -578,6 +579,15 @@ void applyActivityDescription(ActivityDescription ad, int index, boolean anim) {
578579 // that this now covers, to improve scrolling speed.
579580 // That can't be done until the anim is complete though.
580581 h .thumbnailViewImage .setImageBitmap (thumbnail );
582+
583+ // scale to fill up the full width
584+ Matrix scaleMatrix = new Matrix ();
585+ float thumbnailViewWidth = h .thumbnailViewImage .getWidth ();
586+ float scale = thumbnailViewWidth / thumbnail .getWidth ();
587+ scaleMatrix .setScale (scale , scale );
588+ h .thumbnailViewImage .setScaleType (ScaleType .MATRIX );
589+ h .thumbnailViewImage .setImageMatrix (scaleMatrix );
590+
581591 if (anim ) {
582592 h .thumbnailViewImage .setAnimation (AnimationUtils .loadAnimation (
583593 mContext , R .anim .recent_appear ));
0 commit comments