summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout/wallpaper_picker.xml6
-rw-r--r--res/layout/wallpaper_picker_image_picker_item.xml (renamed from res/layout/wallpaper_picker_gallery_item.xml)2
-rw-r--r--res/layout/wallpaper_picker_live_wallpaper_item.xml (renamed from res/layout/live_wallpaper_picker_item.xml)6
-rw-r--r--res/layout/wallpaper_picker_third_party_item.xml (renamed from res/layout/third_party_wallpaper_picker_item.xml)2
-rw-r--r--res/values/dimens.xml1
-rw-r--r--src/com/android/launcher3/LiveWallpaperListAdapter.java2
-rw-r--r--src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java11
-rw-r--r--src/com/android/launcher3/WallpaperPickerActivity.java2
8 files changed, 22 insertions, 10 deletions
diff --git a/res/layout/wallpaper_picker.xml b/res/layout/wallpaper_picker.xml
index fd66a57be..c91cc7e6a 100644
--- a/res/layout/wallpaper_picker.xml
+++ b/res/layout/wallpaper_picker.xml
@@ -55,15 +55,15 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
- <LinearLayout android:id="@+id/third_party_wallpaper_list"
+ <LinearLayout android:id="@+id/wallpaper_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" />
- <LinearLayout android:id="@+id/wallpaper_list"
+ <LinearLayout android:id="@+id/live_wallpaper_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" />
- <LinearLayout android:id="@+id/live_wallpaper_list"
+ <LinearLayout android:id="@+id/third_party_wallpaper_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" />
diff --git a/res/layout/wallpaper_picker_gallery_item.xml b/res/layout/wallpaper_picker_image_picker_item.xml
index d14ab3e5f..ae3c43d8e 100644
--- a/res/layout/wallpaper_picker_gallery_item.xml
+++ b/res/layout/wallpaper_picker_image_picker_item.xml
@@ -32,6 +32,8 @@
android:id="@+id/wallpaper_item_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:ellipsize="marquee"
+ android:gravity="center"
android:layout_gravity="center"
android:text="@string/pick_image"
android:drawableTop="@drawable/ic_images"
diff --git a/res/layout/live_wallpaper_picker_item.xml b/res/layout/wallpaper_picker_live_wallpaper_item.xml
index 29aa12ca2..29fdb1b82 100644
--- a/res/layout/live_wallpaper_picker_item.xml
+++ b/res/layout/wallpaper_picker_live_wallpaper_item.xml
@@ -31,14 +31,16 @@
android:scaleType="centerCrop" />
<ImageView
android:id="@+id/wallpaper_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_width="@dimen/wallpaperItemIconSize"
+ android:layout_height="@dimen/wallpaperItemIconSize"
android:layout_gravity="center"
android:visibility="gone" />
<TextView
android:id="@+id/wallpaper_item_label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:singleLine="true"
+ android:ellipsize="marquee"
android:gravity="center"
android:padding="4dp"
android:layout_gravity="bottom"
diff --git a/res/layout/third_party_wallpaper_picker_item.xml b/res/layout/wallpaper_picker_third_party_item.xml
index c2aeade9e..68661bc00 100644
--- a/res/layout/third_party_wallpaper_picker_item.xml
+++ b/res/layout/wallpaper_picker_third_party_item.xml
@@ -32,6 +32,8 @@
android:id="@+id/wallpaper_item_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:ellipsize="marquee"
+ android:gravity="center"
android:layout_gravity="center"
android:drawablePadding="4dp"
android:textColor="@android:color/white"/>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 2910b7c7c..b4b2367c7 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -24,6 +24,7 @@
<!-- Wallpaper picker -->
<dimen name="wallpaperThumbnailWidth">106.5dp</dimen>
<dimen name="wallpaperThumbnailHeight">94.5dp</dimen>
+ <dimen name="wallpaperItemIconSize">32dp</dimen>
<!-- Cling -->
<dimen name="clingPunchThroughGraphicCenterRadius">94dp</dimen>
diff --git a/src/com/android/launcher3/LiveWallpaperListAdapter.java b/src/com/android/launcher3/LiveWallpaperListAdapter.java
index e9e5e79a8..4b597946f 100644
--- a/src/com/android/launcher3/LiveWallpaperListAdapter.java
+++ b/src/com/android/launcher3/LiveWallpaperListAdapter.java
@@ -85,7 +85,7 @@ public class LiveWallpaperListAdapter extends BaseAdapter implements ListAdapter
View view;
if (convertView == null) {
- view = mInflater.inflate(R.layout.live_wallpaper_picker_item, parent, false);
+ view = mInflater.inflate(R.layout.wallpaper_picker_live_wallpaper_item, parent, false);
} else {
view = convertView;
}
diff --git a/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java b/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java
index 70ef7c34f..494694cbd 100644
--- a/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java
+++ b/src/com/android/launcher3/ThirdPartyWallpaperPickerListAdapter.java
@@ -22,6 +22,8 @@ import android.content.Intent;
import android.content.pm.ActivityInfo;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
+import android.graphics.Rect;
+import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@@ -38,6 +40,7 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements
private final LayoutInflater mInflater;
private final PackageManager mPackageManager;
+ private final int mIconSize;
private List<ThirdPartyWallpaperTile> mThirdPartyWallpaperPickers =
new ArrayList<ThirdPartyWallpaperTile>();
@@ -61,6 +64,7 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements
public ThirdPartyWallpaperPickerListAdapter(Context context) {
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mPackageManager = context.getPackageManager();
+ mIconSize = context.getResources().getDimensionPixelSize(R.dimen.wallpaperItemIconSize);
final PackageManager pm = mPackageManager;
final Intent pickWallpaperIntent = new Intent(Intent.ACTION_SET_WALLPAPER);
@@ -117,7 +121,7 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements
View view;
if (convertView == null) {
- view = mInflater.inflate(R.layout.third_party_wallpaper_picker_item, parent, false);
+ view = mInflater.inflate(R.layout.wallpaper_picker_third_party_item, parent, false);
} else {
view = convertView;
}
@@ -127,8 +131,9 @@ public class ThirdPartyWallpaperPickerListAdapter extends BaseAdapter implements
ResolveInfo info = mThirdPartyWallpaperPickers.get(position).mResolveInfo;
TextView label = (TextView) view.findViewById(R.id.wallpaper_item_label);
label.setText(info.loadLabel(mPackageManager));
- label.setCompoundDrawablesWithIntrinsicBounds(
- null, info.loadIcon(mPackageManager), null, null);
+ Drawable icon = info.loadIcon(mPackageManager);
+ icon.setBounds(new Rect(0, 0, mIconSize, mIconSize));
+ label.setCompoundDrawables(null, icon, null, null);
return view;
}
}
diff --git a/src/com/android/launcher3/WallpaperPickerActivity.java b/src/com/android/launcher3/WallpaperPickerActivity.java
index 12e69d312..0282eacd4 100644
--- a/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -295,7 +295,7 @@ public class WallpaperPickerActivity extends WallpaperCropActivity {
// Add a tile for the Gallery
LinearLayout masterWallpaperList = (LinearLayout) findViewById(R.id.master_wallpaper_list);
FrameLayout galleryThumbnail = (FrameLayout) getLayoutInflater().
- inflate(R.layout.wallpaper_picker_gallery_item, masterWallpaperList, false);
+ inflate(R.layout.wallpaper_picker_image_picker_item, masterWallpaperList, false);
setWallpaperItemPaddingToZero(galleryThumbnail);
masterWallpaperList.addView(galleryThumbnail, 0);