diff options
-rw-r--r-- | res/drawable-xlarge/wallpaper_leaf.jpg | bin | 0 -> 938236 bytes | |||
-rw-r--r-- | res/drawable-xlarge/wallpaper_leaf_small.jpg | bin | 0 -> 21537 bytes | |||
-rw-r--r-- | res/values-xlarge/wallpapers.xml | 22 | ||||
-rw-r--r-- | src/com/android/launcher2/Launcher.java | 42 |
4 files changed, 42 insertions, 22 deletions
diff --git a/res/drawable-xlarge/wallpaper_leaf.jpg b/res/drawable-xlarge/wallpaper_leaf.jpg Binary files differnew file mode 100644 index 000000000..afb0acc1c --- /dev/null +++ b/res/drawable-xlarge/wallpaper_leaf.jpg diff --git a/res/drawable-xlarge/wallpaper_leaf_small.jpg b/res/drawable-xlarge/wallpaper_leaf_small.jpg Binary files differnew file mode 100644 index 000000000..48e9f3e64 --- /dev/null +++ b/res/drawable-xlarge/wallpaper_leaf_small.jpg diff --git a/res/values-xlarge/wallpapers.xml b/res/values-xlarge/wallpapers.xml new file mode 100644 index 000000000..90a6af7a7 --- /dev/null +++ b/res/values-xlarge/wallpapers.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + * Copyright (C) 2009 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --> + +<resources> + <string-array name="wallpapers" translatable="false"> + <item>wallpaper_leaf</item> + </string-array> +</resources> diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 4378af19c..b5d0dbb5d 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -16,14 +16,6 @@ package com.android.launcher2; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - import android.animation.Animatable; import android.animation.AnimatableListenerAdapter; import android.animation.Animator; @@ -44,8 +36,8 @@ import android.content.ContentResolver; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; -import android.content.IntentFilter; import android.content.Intent.ShortcutIconResource; +import android.content.IntentFilter; import android.content.pm.ActivityInfo; import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; @@ -79,12 +71,10 @@ import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; import android.view.View; +import android.view.View.OnLongClickListener; import android.view.ViewGroup; import android.view.WindowManager; import android.view.animation.AccelerateInterpolator; -import android.view.View.OnLongClickListener; -import android.view.animation.Animation; -import android.view.animation.AnimationUtils; import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; import android.view.inputmethod.InputMethodManager; @@ -94,15 +84,22 @@ import android.widget.LinearLayout; import android.widget.PopupWindow; import android.widget.RelativeLayout; import android.widget.TabHost; +import android.widget.TabHost.OnTabChangeListener; +import android.widget.TabHost.TabContentFactory; import android.widget.TabWidget; import android.widget.TextView; import android.widget.Toast; -import android.widget.TabHost.OnTabChangeListener; -import android.widget.TabHost.TabContentFactory; - import com.android.common.Search; import com.android.launcher.R; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + /** * Default launcher application. */ @@ -463,11 +460,12 @@ public final class Launcher extends Activity WallpaperManager wpm = (WallpaperManager)getSystemService(WALLPAPER_SERVICE); Display display = getWindowManager().getDefaultDisplay(); - boolean isPortrait = display.getWidth() < display.getHeight(); - - final int width = isPortrait ? display.getWidth() : display.getHeight(); - final int height = isPortrait ? display.getHeight() : display.getWidth(); - wpm.suggestDesiredDimensions(width * WALLPAPER_SCREENS_SPAN, height); + // TODO: Put back when we decide about scrolling the wallpaper + // boolean isPortrait = display.getWidth() < display.getHeight(); + // final int width = isPortrait ? display.getWidth() : display.getHeight(); + // final int height = isPortrait ? display.getHeight() : display.getWidth(); + wpm.suggestDesiredDimensions(Math.max(display.getWidth(), display.getHeight()), + Math.max(display.getWidth(), display.getHeight())); } // Note: This doesn't do all the client-id magic that BrowserProvider does @@ -1009,7 +1007,7 @@ public final class Launcher extends Activity /** * Add a widget to the workspace. * - * @param data The intent describing the appWidgetId. + * @param appWidgetId The app widget id * @param cellInfo The position on screen where to create the widget. */ private void completeAddAppWidget(int appWidgetId, CellLayout.CellInfo cellInfo) { @@ -2111,7 +2109,7 @@ public final class Launcher extends Activity // Now a part of LauncherModel.Callbacks. Used to reorder loading steps. public boolean isAllAppsVisible() { - return (mAllAppsGrid != null) ? mAllAppsGrid.isVisible() : false; + return mAllAppsGrid != null && mAllAppsGrid.isVisible(); } // AllAppsView.Watcher |