Merge "Fixing clipped landscape layout and crash when tapping to add widgets."

This commit is contained in:
Winson Chung
2011-05-23 11:53:29 -07:00
committed by Android (Google) Code Review
3 changed files with 19 additions and 17 deletions
+2 -2
View File
@@ -24,7 +24,7 @@
launcher:cellWidth="@dimen/workspace_cell_width"
launcher:cellHeight="@dimen/workspace_cell_height"
launcher:xAxisStartPadding="65dip"
launcher:xAxisEndPadding="65dip"
launcher:xAxisStartPadding="48dip"
launcher:xAxisEndPadding="0dip"
launcher:yAxisStartPadding="0dip"
launcher:yAxisEndPadding="0dip"/>
+1 -1
View File
@@ -15,7 +15,7 @@
-->
<resources>
<dimen name="workspace_cell_width">106dip</dimen>
<dimen name="workspace_cell_width">96dip</dimen>
<dimen name="workspace_cell_height">74dip</dimen>
<dimen name="folder_cell_width">100dip</dimen>
<dimen name="folder_cell_height">74dip</dimen>
@@ -293,20 +293,22 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
}
});
} else if (v instanceof PagedViewWidget) {
final ResolveInfo info = (ResolveInfo) v.getTag();
if (mWallpapers.contains(info)) {
// Start the wallpaper picker
animateClickFeedback(v, new Runnable() {
@Override
public void run() {
// add the shortcut
Intent createWallpapersIntent = new Intent(Intent.ACTION_SET_WALLPAPER);
ComponentName name = new ComponentName(info.activityInfo.packageName,
info.activityInfo.name);
createWallpapersIntent.setComponent(name);
mLauncher.processWallpaper(createWallpapersIntent);
}
});
if (v.getTag() instanceof ResolveInfo) {
final ResolveInfo info = (ResolveInfo) v.getTag();
if (mWallpapers.contains(info)) {
// Start the wallpaper picker
animateClickFeedback(v, new Runnable() {
@Override
public void run() {
// add the shortcut
Intent createWallpapersIntent = new Intent(Intent.ACTION_SET_WALLPAPER);
ComponentName name = new ComponentName(info.activityInfo.packageName,
info.activityInfo.name);
createWallpapersIntent.setComponent(name);
mLauncher.processWallpaper(createWallpapersIntent);
}
});
}
} else {
// Add the widget to the current workspace screen
Workspace w = mLauncher.getWorkspace();