merge in ics-mr1-release history after reset to ics-mr1
diff --git a/res/layout-sw600dp/market_button.xml b/res/layout-sw600dp/market_button.xml
index ad5f6da..3f31319 100644
--- a/res/layout-sw600dp/market_button.xml
+++ b/res/layout-sw600dp/market_button.xml
@@ -19,13 +19,15 @@
style="@style/MarketButton"
android:onClick="onClickAppMarketButton"
android:gravity="center"
- android:paddingLeft="@dimen/toolbar_button_horizontal_padding"
- android:paddingRight="@dimen/toolbar_button_horizontal_padding"
+ android:paddingLeft="10dp"
+ android:paddingRight="10dp"
android:drawablePadding="10dp"
android:text="@string/market"
android:contentDescription="@string/market"
android:textColor="@color/workspace_all_apps_and_delete_zone_text_color"
- android:textSize="18sp"
+ android:textStyle="bold"
+ android:textSize="14sp"
+ android:textAllCaps="true"
android:shadowColor="@color/workspace_all_apps_and_delete_zone_text_shadow_color"
android:shadowDx="0.0"
android:shadowDy="0.0"
diff --git a/res/layout-sw600dp/wallpaper_item.xml b/res/layout-sw600dp/wallpaper_item.xml
index 9a596cb..9461e3b 100644
--- a/res/layout-sw600dp/wallpaper_item.xml
+++ b/res/layout-sw600dp/wallpaper_item.xml
@@ -16,13 +16,11 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:padding="@dimen/live_wallpaper_grid_item_padding">
- <ImageView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:background="@drawable/wallpaper_gallery_item">
+ <ImageView
android:id="@+id/wallpaper_image"
android:layout_width="@dimen/wallpaper_chooser_grid_width"
android:layout_height="@dimen/wallpaper_chooser_grid_height"
android:scaleType="centerCrop"
- android:adjustViewBounds="false"
- android:focusable="false"
- android:padding="0dp" />
+ android:focusable="true" />
</FrameLayout>
\ No newline at end of file
diff --git a/res/layout/qsb_bar.xml b/res/layout/qsb_bar.xml
index c58836e..c2179ce 100644
--- a/res/layout/qsb_bar.xml
+++ b/res/layout/qsb_bar.xml
@@ -17,8 +17,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
style="@style/QSBBar"
- android:focusable="false"
- android:background="@drawable/search_bg_panel">
+ android:focusable="false">
<!-- Search buttons container -->
<include android:id="@+id/qsb_search_bar"
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index ec61dc9..5070c88 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -84,7 +84,7 @@
<string name="uninstall_system_app_text" msgid="7488523163288397451">"Questa è un\'applicazione di sistema e non può essere disinstallata."</string>
<string name="dream_name" msgid="2847171357608437154">"Lanciamissili"</string>
<string name="folder_hint_text" msgid="8633351560105748141">"Cartella senza nome"</string>
- <string name="workspace_cling_title" msgid="738396473989890567">"Fai come se fossi a casa tua."</string>
+ <string name="workspace_cling_title" msgid="738396473989890567">"Mettiti comodo"</string>
<string name="workspace_cling_move_item" msgid="791013895761065070">"Puoi posizionare le tue applicazioni preferite qui."</string>
<string name="workspace_cling_open_all_apps" msgid="2459977609848572588">"Per visualizzare tutte le tue applicazioni, tocca il cerchio."</string>
<string name="all_apps_cling_title" msgid="2559734712581447107">"Scegli alcune applicazioni"</string>
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index 0609002..d17125c 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -75,14 +75,18 @@
<item name="android:textSize">13sp</item>
</style>
<style name="TabIndicator.AppsCustomize">
- <item name="android:paddingLeft">40dp</item>
- <item name="android:paddingRight">40dp</item>
- <item name="android:paddingTop">10dp</item>
+ <item name="android:paddingTop">16dp</item>
<item name="android:paddingBottom">20dp</item>
- <item name="android:textSize">20sp</item>
+ <item name="android:textSize">14sp</item>
</style>
<!-- QSB Search / Drop Target bar -->
+ <style name="QSBBar">
+ <item name="android:orientation">horizontal</item>
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">@dimen/qsb_bar_height</item>
+ <item name="android:layout_gravity">top|center_horizontal</item>
+ </style>
<style name="SearchDropTargetBar">
<item name="android:orientation">horizontal</item>
<item name="android:layout_width">match_parent</item>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index f575f00..981d5be 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -116,6 +116,7 @@
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">@dimen/qsb_bar_height</item>
<item name="android:layout_gravity">top|center_horizontal</item>
+ <item name="android:background">@drawable/search_bg_panel</item>
</style>
<style name="SearchDropTargetBar">
<item name="android:orientation">horizontal</item>
@@ -158,8 +159,8 @@
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">match_parent</item>
<item name="android:gravity">center</item>
- <item name="android:paddingLeft">35dp</item>
- <item name="android:paddingRight">35dp</item>
+ <item name="android:paddingLeft">30dp</item>
+ <item name="android:paddingRight">30dp</item>
<item name="android:background">@drawable/tab_widget_indicator_selector</item>
<item name="android:textColor">?android:attr/textColorPrimary</item>
<item name="android:textSize">12sp</item>
diff --git a/src/com/android/launcher2/AppsCustomizePagedView.java b/src/com/android/launcher2/AppsCustomizePagedView.java
index d8ff73c..f5142bf 100644
--- a/src/com/android/launcher2/AppsCustomizePagedView.java
+++ b/src/com/android/launcher2/AppsCustomizePagedView.java
@@ -31,11 +31,11 @@
import android.content.res.Resources;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
-import android.graphics.Bitmap.Config;
import android.graphics.Canvas;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.RectF;
+import android.graphics.Bitmap.Config;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Process;
@@ -47,6 +47,8 @@
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AccelerateInterpolator;
+import android.view.animation.DecelerateInterpolator;
+import android.view.animation.Interpolator;
import android.widget.GridLayout;
import android.widget.ImageView;
import android.widget.Toast;
@@ -218,6 +220,7 @@
private static float TRANSITION_MAX_ROTATION = 22;
private static final boolean PERFORM_OVERSCROLL_ROTATION = true;
private AccelerateInterpolator mAlphaInterpolator = new AccelerateInterpolator(0.9f);
+ private DecelerateInterpolator mLeftScreenAlphaInterpolator = new DecelerateInterpolator(4);
// Previews & outlines
ArrayList<AppsCustomizeAsyncTask> mRunningTasks;
@@ -262,7 +265,7 @@
// (top + bottom)
mWidgetPreviewIconPaddedDimension =
(int) (mAppIconSize * (1 + (2 * sWidgetPreviewIconPaddingPercentage)));
- mFadeInAdjacentScreens = LauncherApplication.isScreenLarge();
+ mFadeInAdjacentScreens = false;
}
@Override
@@ -1218,8 +1221,15 @@
interpolatedProgress * TRANSITION_SCALE_FACTOR;
float translationX = Math.min(0, scrollProgress) * v.getMeasuredWidth();
- float alpha = scrollProgress < 0 ? mAlphaInterpolator.getInterpolation(
+ float alpha;
+
+ if (!LauncherApplication.isScreenLarge() || scrollProgress < 0) {
+ alpha = scrollProgress < 0 ? mAlphaInterpolator.getInterpolation(
1 - Math.abs(scrollProgress)) : 1.0f;
+ } else {
+ // On large screens we need to fade the page as it nears its leftmost position
+ alpha = mLeftScreenAlphaInterpolator.getInterpolation(1 - scrollProgress);
+ }
v.setCameraDistance(mDensity * CAMERA_DISTANCE);
int pageWidth = v.getMeasuredWidth();
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index 3ee2732..c06bc0c 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -121,7 +121,7 @@
private static int mCellCountX;
private static int mCellCountY;
- protected Configuration mPreviousConfig;
+ protected int mPreviousConfigMcc;
public interface Callbacks {
public boolean setLoadOnResume();
@@ -152,7 +152,8 @@
final Resources res = app.getResources();
mAllAppsLoadDelay = res.getInteger(R.integer.config_allAppsBatchLoadDelay);
mBatchSize = res.getInteger(R.integer.config_allAppsBatchSize);
- mPreviousConfig = res.getConfiguration();
+ Configuration config = res.getConfiguration();
+ mPreviousConfigMcc = config.mcc;
}
public Bitmap getFallbackIcon() {
@@ -623,13 +624,13 @@
// and we would need to clear out the labels in all apps/workspace. Same handling as
// above for ACTION_LOCALE_CHANGED
Configuration currentConfig = context.getResources().getConfiguration();
- if((mPreviousConfig.diff(currentConfig) & ActivityInfo.CONFIG_MCC) != 0){
+ if (mPreviousConfigMcc != currentConfig.mcc) {
Log.d(TAG, "Reload apps on config change. curr_mcc:"
- + currentConfig.mcc + " prevmcc:" + mPreviousConfig.mcc);
+ + currentConfig.mcc + " prevmcc:" + mPreviousConfigMcc);
forceReload();
}
// Update previousConfig
- mPreviousConfig = currentConfig;
+ mPreviousConfigMcc = currentConfig.mcc;
} else if (SearchManager.INTENT_GLOBAL_SEARCH_ACTIVITY_CHANGED.equals(action) ||
SearchManager.INTENT_ACTION_SEARCHABLES_CHANGED.equals(action)) {
if (mCallbacks != null) {
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 7be19bf..3d2deb8 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -102,6 +102,7 @@
protected final static float ALPHA_QUANTIZE_LEVEL = 0.0001f;
protected int mTouchState = TOUCH_STATE_REST;
+ protected boolean mForceScreenScrolled = false;
protected OnLongClickListener mLongClickListener;
@@ -672,14 +673,25 @@
}
@Override
+ protected void onViewAdded(View child) {
+ super.onViewAdded(child);
+
+ // This ensures that when children are added, they get the correct transforms / alphas
+ // in accordance with any scroll effects.
+ mForceScreenScrolled = true;
+ invalidate();
+ }
+
+ @Override
protected void dispatchDraw(Canvas canvas) {
int halfScreenSize = getMeasuredWidth() / 2;
int screenCenter = mScrollX + halfScreenSize;
- if (screenCenter != mLastScreenCenter) {
+ if (screenCenter != mLastScreenCenter || mForceScreenScrolled) {
screenScrolled(screenCenter);
updateAdjacentPagesAlpha();
mLastScreenCenter = screenCenter;
+ mForceScreenScrolled = false;
}
// Find out which screens are visible; as an optimization we only call draw on them