diff options
Diffstat (limited to 'src/com/android/launcher3')
-rw-r--r-- | src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java | 9 | ||||
-rw-r--r-- | src/com/android/launcher3/WallpaperCropActivity.java | 4 | ||||
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 12 |
3 files changed, 15 insertions, 10 deletions
diff --git a/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java b/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java index 7ed1c1bfb..70ef7c34f 100644 --- a/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java +++ b/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java @@ -39,7 +39,8 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements private final LayoutInflater mInflater; private final PackageManager mPackageManager; - private List<ResolveInfo> mThirdPartyWallpaperPickers = new ArrayList<ResolveInfo>(); + private List<ThirdPartyWallpaperTile> mThirdPartyWallpaperPickers = + new ArrayList<ThirdPartyWallpaperTile>(); public static class ThirdPartyWallpaperTile extends WallpaperPickerActivity.WallpaperTileInfo { private ResolveInfo mResolveInfo; @@ -96,7 +97,7 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements continue outerLoop; } } - mThirdPartyWallpaperPickers.add(info); + mThirdPartyWallpaperPickers.add(new ThirdPartyWallpaperTile(info)); } } @@ -104,7 +105,7 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements return mThirdPartyWallpaperPickers.size(); } - public ResolveInfo getItem(int position) { + public ThirdPartyWallpaperTile getItem(int position) { return mThirdPartyWallpaperPickers.get(position); } @@ -123,7 +124,7 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements WallpaperPickerActivity.setWallpaperItemPaddingToZero((FrameLayout) view); - ResolveInfo info = mThirdPartyWallpaperPickers.get(position); + ResolveInfo info = mThirdPartyWallpaperPickers.get(position).mResolveInfo; TextView label = (TextView) view.findViewById(R.id.wallpaper_item_label); label.setText(info.loadLabel(mPackageManager)); label.setCompoundDrawablesWithIntrinsicBounds( diff --git a/src/com/android/launcher3/WallpaperCropActivity.java b/src/com/android/launcher3/WallpaperCropActivity.java index bc8df6c1b..cdfcd1c00 100644 --- a/src/com/android/launcher3/WallpaperCropActivity.java +++ b/src/com/android/launcher3/WallpaperCropActivity.java @@ -506,7 +506,9 @@ public class WallpaperCropActivity extends Activity { (int) returnRect.height(), Bitmap.Config.ARGB_8888); if (tmp != null) { Canvas c = new Canvas(tmp); - c.drawBitmap(crop, m, new Paint()); + Paint p = new Paint(); + p.setFilterBitmap(true); + c.drawBitmap(crop, m, p); crop = tmp; } } else if (mRotation > 0) { diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 68d241466..ea348ef8a 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -1070,7 +1070,6 @@ public class Workspace extends SmoothPagedView class WallpaperOffsetInterpolator implements Choreographer.FrameCallback { float mFinalOffset = 0.0f; float mCurrentOffset = 0.5f; // to force an initial update - //long mLastWallpaperOffsetUpdateTime; boolean mWaitingForUpdate; Choreographer mChoreographer; Interpolator mInterpolator; @@ -1135,10 +1134,12 @@ public class Workspace extends SmoothPagedView } // Exclude the leftmost page - final int firstIndex = isLayoutRtl() ? getChildCount() - 2 : 1; + final int startPage = hasCustomContent() ? 1 : 0; + final int firstIndex = isLayoutRtl() ? getChildCount() - 1 - startPage : startPage; // Exclude the last extra empty screen (if we have > MIN_PARALLAX_PAGE_SPAN pages) - int extra = numExtraScreensToIgnore(); - final int lastIndex = isLayoutRtl() ? 0 + extra : getChildCount() - 1 - extra; + int emptyExtraPages = numExtraScreensToIgnore(); + final int lastIndex = + isLayoutRtl() ? 0 + emptyExtraPages : getChildCount() - 1 - emptyExtraPages; int firstPageScrollX = getScrollForPage(firstIndex); int scrollRange = getScrollForPage(lastIndex) - firstPageScrollX; @@ -1166,7 +1167,8 @@ public class Workspace extends SmoothPagedView } private int getNumScreensExcludingExtraEmptyScreenAndLeftmost() { - int numScrollingPages = getChildCount() - 1 - numExtraScreensToIgnore(); + int numScrollingPages = getChildCount() - numExtraScreensToIgnore(); + if (hasCustomContent()) numScrollingPages -= 1; return numScrollingPages; } |