diff options
-rw-r--r-- | res/layout-xlarge/all_apps_paged_view_application.xml | 2 | ||||
-rw-r--r-- | res/layout-xlarge/customize_paged_view_item.xml | 2 | ||||
-rw-r--r-- | src/com/android/launcher2/PagedViewIcon.java | 10 |
3 files changed, 5 insertions, 9 deletions
diff --git a/res/layout-xlarge/all_apps_paged_view_application.xml b/res/layout-xlarge/all_apps_paged_view_application.xml index 7458222..48b5712 100644 --- a/res/layout-xlarge/all_apps_paged_view_application.xml +++ b/res/layout-xlarge/all_apps_paged_view_application.xml @@ -27,7 +27,5 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_horizontal" - android:singleLine="false" - android:maxLines="1" style="@style/WorkspaceIcon.Portrait" /> diff --git a/res/layout-xlarge/customize_paged_view_item.xml b/res/layout-xlarge/customize_paged_view_item.xml index bbc04d7..35e06c3 100644 --- a/res/layout-xlarge/customize_paged_view_item.xml +++ b/res/layout-xlarge/customize_paged_view_item.xml @@ -26,7 +26,5 @@ android:id="@+id/customize_icon" android:layout_width="match_parent" android:layout_height="match_parent" - android:singleLine="false" - android:maxLines="1" style="@style/WorkspaceIcon.Landscape" /> diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java index 89cf331..50ba8d4 100644 --- a/src/com/android/launcher2/PagedViewIcon.java +++ b/src/com/android/launcher2/PagedViewIcon.java @@ -16,9 +16,6 @@ package com.android.launcher2; -import com.android.launcher.R; -import com.android.launcher2.PagedView.PagedViewIconCache; - import android.content.Context; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; @@ -26,7 +23,6 @@ import android.content.res.TypedArray; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Paint; -import android.graphics.Rect; import android.os.Handler; import android.os.HandlerThread; import android.os.Message; @@ -34,6 +30,9 @@ import android.util.AttributeSet; import android.widget.Checkable; import android.widget.TextView; +import com.android.launcher.R; +import com.android.launcher2.PagedView.PagedViewIconCache; + /** @@ -195,11 +194,12 @@ public class PagedViewIcon extends TextView implements Checkable { } if (overlay != null) { + final int offset = getScrollX(); final int compoundPaddingLeft = getCompoundPaddingLeft(); final int compoundPaddingRight = getCompoundPaddingRight(); int hspace = getWidth() - compoundPaddingRight - compoundPaddingLeft; canvas.drawBitmap(overlay, - compoundPaddingLeft + (hspace - overlay.getWidth()) / 2, + offset + compoundPaddingLeft + (hspace - overlay.getWidth()) / 2, mPaddingTop, mPaint); } |