Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9316e7e3 authored by Michael Jurka's avatar Michael Jurka
Browse files

Reduce height of recent app thumbnails

Change-Id: I225147d49a6d7b71a08ca0464e702c0aeadb419d
parent b9e7e132
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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>
+11 −1
Original line number Diff line number Diff line
@@ -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));