merge in ics-factoryrom-release history after reset to ics-factoryrom
diff --git a/res/drawable-hdpi/ic_home_google_logo_normal_holo.png b/res/drawable-hdpi/ic_home_google_logo_normal_holo.png
new file mode 100644
index 0000000..af78316
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_google_logo_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_search_normal_holo.png b/res/drawable-hdpi/ic_home_search_normal_holo.png
new file mode 100644
index 0000000..3f64d68
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_search_normal_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_home_voice_search_holo.png b/res/drawable-hdpi/ic_home_voice_search_holo.png
new file mode 100644
index 0000000..dae5446
--- /dev/null
+++ b/res/drawable-hdpi/ic_home_voice_search_holo.png
Binary files differ
diff --git a/res/drawable-hdpi/ic_search_normal_holo.png b/res/drawable-hdpi/ic_search_normal_holo.png
deleted file mode 100644
index d888214..0000000
--- a/res/drawable-hdpi/ic_search_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-hdpi/ic_voice_search_holo.png b/res/drawable-hdpi/ic_voice_search_holo.png
deleted file mode 100644
index d1ec7e3..0000000
--- a/res/drawable-hdpi/ic_voice_search_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-land-hdpi/ic_home_voice_search_holo.png b/res/drawable-land-hdpi/ic_home_voice_search_holo.png
new file mode 100644
index 0000000..5a7fc99
--- /dev/null
+++ b/res/drawable-land-hdpi/ic_home_voice_search_holo.png
Binary files differ
diff --git a/res/drawable-land-mdpi/ic_home_voice_search_holo.png b/res/drawable-land-mdpi/ic_home_voice_search_holo.png
new file mode 100644
index 0000000..ee7dde5
--- /dev/null
+++ b/res/drawable-land-mdpi/ic_home_voice_search_holo.png
Binary files differ
diff --git a/res/drawable-land-xhdpi/ic_home_voice_search_holo.png b/res/drawable-land-xhdpi/ic_home_voice_search_holo.png
new file mode 100644
index 0000000..56bbbbb
--- /dev/null
+++ b/res/drawable-land-xhdpi/ic_home_voice_search_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_home_google_logo_normal_holo.png b/res/drawable-mdpi/ic_home_google_logo_normal_holo.png
new file mode 100644
index 0000000..f298f61
--- /dev/null
+++ b/res/drawable-mdpi/ic_home_google_logo_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_home_search_normal_holo.png b/res/drawable-mdpi/ic_home_search_normal_holo.png
new file mode 100644
index 0000000..7367c38
--- /dev/null
+++ b/res/drawable-mdpi/ic_home_search_normal_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_home_voice_search_holo.png b/res/drawable-mdpi/ic_home_voice_search_holo.png
new file mode 100644
index 0000000..f211a7b
--- /dev/null
+++ b/res/drawable-mdpi/ic_home_voice_search_holo.png
Binary files differ
diff --git a/res/drawable-mdpi/ic_search_normal_holo.png b/res/drawable-mdpi/ic_search_normal_holo.png
deleted file mode 100644
index 9eb214a..0000000
--- a/res/drawable-mdpi/ic_search_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-mdpi/ic_voice_search_holo.png b/res/drawable-mdpi/ic_voice_search_holo.png
deleted file mode 100644
index 34097b7..0000000
--- a/res/drawable-mdpi/ic_voice_search_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_home_google_logo_normal_holo.png b/res/drawable-xhdpi/ic_home_google_logo_normal_holo.png
new file mode 100644
index 0000000..8079ee5
--- /dev/null
+++ b/res/drawable-xhdpi/ic_home_google_logo_normal_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_home_search_normal_holo.png b/res/drawable-xhdpi/ic_home_search_normal_holo.png
new file mode 100644
index 0000000..0fe1cd1
--- /dev/null
+++ b/res/drawable-xhdpi/ic_home_search_normal_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_home_voice_search_holo.png b/res/drawable-xhdpi/ic_home_voice_search_holo.png
new file mode 100644
index 0000000..1fc5cc8
--- /dev/null
+++ b/res/drawable-xhdpi/ic_home_voice_search_holo.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_google_logo_normal_holo.png b/res/drawable-xhdpi/ic_search_google_logo_normal_holo.png
deleted file mode 100644
index b4978ae..0000000
--- a/res/drawable-xhdpi/ic_search_google_logo_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_search_normal_holo.png b/res/drawable-xhdpi/ic_search_normal_holo.png
deleted file mode 100644
index 0f4caad..0000000
--- a/res/drawable-xhdpi/ic_search_normal_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/drawable-xhdpi/ic_voice_search_holo.png b/res/drawable-xhdpi/ic_voice_search_holo.png
deleted file mode 100644
index a415218..0000000
--- a/res/drawable-xhdpi/ic_voice_search_holo.png
+++ /dev/null
Binary files differ
diff --git a/res/layout-land/search_bar.xml b/res/layout-land/search_bar.xml
index 452a80c..a1c87e4 100644
--- a/res/layout-land/search_bar.xml
+++ b/res/layout-land/search_bar.xml
@@ -25,7 +25,7 @@
android:id="@+id/search_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:src="@drawable/ic_search_normal_holo"
+ android:src="@drawable/ic_home_search_normal_holo"
android:adjustViewBounds="true"
android:background="?android:attr/selectableItemBackground"
android:onClick="onClickSearchButton"
@@ -47,7 +47,7 @@
android:id="@+id/voice_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:src="@drawable/ic_voice_search_holo"
+ android:src="@drawable/ic_home_voice_search_holo"
android:adjustViewBounds="true"
android:background="?android:attr/selectableItemBackground"
android:onClick="onClickVoiceButton"
diff --git a/res/layout-port/launcher.xml b/res/layout-port/launcher.xml
index b45800e..9637700 100644
--- a/res/layout-port/launcher.xml
+++ b/res/layout-port/launcher.xml
@@ -25,13 +25,6 @@
<!-- Keep these behind the workspace so that they are not visible when
we go into AllApps -->
<include
- android:id="@+id/qsb_divider"
- layout="@layout/workspace_divider"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginTop="@dimen/qsb_bar_height"
- android:layout_gravity="top" />
- <include
android:id="@+id/dock_divider"
layout="@layout/workspace_divider"
android:layout_width="match_parent"
diff --git a/res/layout-port/search_bar.xml b/res/layout-port/search_bar.xml
index d548453..468e945 100644
--- a/res/layout-port/search_bar.xml
+++ b/res/layout-port/search_bar.xml
@@ -18,7 +18,9 @@
xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
style="@style/SearchDropTargetBar"
android:layout_width="match_parent"
- android:layout_height="@dimen/qsb_bar_height">
+ android:layout_height="@dimen/search_bar_height"
+ android:layout_gravity="bottom|center_horizontal"
+ android:background="@drawable/search_frame">
<!-- Global search icon -->
<LinearLayout
style="@style/SearchButton"
@@ -36,19 +38,19 @@
android:id="@+id/search_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:src="@drawable/ic_search_normal_holo"
+ android:src="@drawable/ic_home_search_normal_holo"
android:adjustViewBounds="true" />
</LinearLayout>
<!-- Voice search icon -->
<ImageView
- style="@style/SearchButton"
+ style="@style/SearchButton.Voice"
android:id="@+id/voice_button"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
- android:src="@drawable/ic_voice_search_holo"
+ android:src="@drawable/ic_home_voice_search_holo"
android:adjustViewBounds="true"
android:background="?android:attr/selectableItemBackground"
android:onClick="onClickVoiceButton"
diff --git a/res/layout-sw600dp/search_bar.xml b/res/layout-sw600dp/search_bar.xml
index 44ac14c..f8b950c 100644
--- a/res/layout-sw600dp/search_bar.xml
+++ b/res/layout-sw600dp/search_bar.xml
@@ -27,7 +27,7 @@
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
- android:src="@drawable/ic_search_normal_holo"
+ android:src="@drawable/ic_home_search_normal_holo"
android:background="?android:attr/selectableItemBackground"
android:onClick="onClickSearchButton"
android:focusable="true"
@@ -50,7 +50,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/search_divider"
- android:src="@drawable/ic_voice_search_holo"
+ android:src="@drawable/ic_home_voice_search_holo"
android:background="?android:attr/selectableItemBackground"
android:onClick="onClickVoiceButton"
android:focusable="true"
diff --git a/res/layout/qsb_bar.xml b/res/layout/qsb_bar.xml
index c2179ce..c58836e 100644
--- a/res/layout/qsb_bar.xml
+++ b/res/layout/qsb_bar.xml
@@ -17,7 +17,8 @@
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:focusable="false"
+ android:background="@drawable/search_bg_panel">
<!-- Search buttons container -->
<include android:id="@+id/qsb_search_bar"
diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml
index 104da63..bb155bd 100644
--- a/res/values-land/styles.xml
+++ b/res/values-land/styles.xml
@@ -60,6 +60,10 @@
<item name="android:paddingBottom">@dimen/toolbar_button_vertical_padding</item>
<item name="android:paddingLeft">@dimen/toolbar_button_horizontal_padding</item>
<item name="android:paddingRight">@dimen/toolbar_button_horizontal_padding</item>
+ <item name="android:shadowColor">#DD000000</item>
+ <item name="android:shadowDx">0.0</item>
+ <item name="android:shadowDy">1.0</item>
+ <item name="android:shadowRadius">4.0</item>
</style>
<style name="TabIndicator.AppsCustomize">
diff --git a/res/values-port/styles.xml b/res/values-port/styles.xml
index 9c5cf7f..d473640 100644
--- a/res/values-port/styles.xml
+++ b/res/values-port/styles.xml
@@ -18,6 +18,11 @@
-->
<resources>
+<!-- QSB -->
+ <style name="SearchButton.Voice">
+ <item name="android:paddingLeft">8dp</item>
+ </style>
+
<!-- Workspace -->
<style name="WorkspaceScreen">
<item name="android:layout_width">wrap_content</item>
diff --git a/res/values-sw340dp-land/dimens.xml b/res/values-sw340dp-land/dimens.xml
index b08159b..e6b40db 100644
--- a/res/values-sw340dp-land/dimens.xml
+++ b/res/values-sw340dp-land/dimens.xml
@@ -22,8 +22,8 @@
<dimen name="workspace_bottom_padding">-1dp</dimen>
<dimen name="workspace_left_padding">-1dp</dimen>
<dimen name="workspace_right_padding">-1dp</dimen>
- <dimen name="workspace_divider_padding_top">20dp</dimen>
- <dimen name="workspace_divider_padding_bottom">20dp</dimen>
+ <dimen name="workspace_divider_padding_top">6dp</dimen>
+ <dimen name="workspace_divider_padding_bottom">6dp</dimen>
<dimen name="hotseat_width_gap">0dp</dimen>
<dimen name="hotseat_height_gap">0dp</dimen>
diff --git a/res/values-sw340dp-land/styles.xml b/res/values-sw340dp-land/styles.xml
index edd63a4..77ce2de 100644
--- a/res/values-sw340dp-land/styles.xml
+++ b/res/values-sw340dp-land/styles.xml
@@ -22,7 +22,7 @@
<style name="QSBBar">
<item name="android:orientation">vertical</item>
<item name="android:layout_width">@dimen/qsb_bar_height</item>
- <item name="android:layout_height">320dp</item>
- <item name="android:layout_gravity">left</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:layout_gravity">left|center_vertical</item>
</style>
</resources>
diff --git a/res/values-sw340dp-port/dimens.xml b/res/values-sw340dp-port/dimens.xml
index 4894fc4..3fea47b 100644
--- a/res/values-sw340dp-port/dimens.xml
+++ b/res/values-sw340dp-port/dimens.xml
@@ -22,8 +22,8 @@
<dimen name="workspace_bottom_padding">-1dp</dimen>
<dimen name="workspace_left_padding">-1dp</dimen>
<dimen name="workspace_right_padding">-1dp</dimen>
- <dimen name="workspace_divider_padding_left">20dp</dimen>
- <dimen name="workspace_divider_padding_right">20dp</dimen>
+ <dimen name="workspace_divider_padding_left">6dp</dimen>
+ <dimen name="workspace_divider_padding_right">6dp</dimen>
<dimen name="hotseat_width_gap">0dp</dimen>
<dimen name="hotseat_height_gap">0dp</dimen>
@@ -32,7 +32,7 @@
<dimen name="hotseat_left_padding">-1dp</dimen>
<dimen name="hotseat_right_padding">-1dp</dimen>
- <dimen name="qsb_bar_height">48dp</dimen>
+ <dimen name="qsb_bar_height">50dp</dimen>
<!-- height of the bottom row of controls -->
<dimen name="button_bar_height">80dip</dimen>
<!-- Because portal animations go beyond the bounds of an icon, we need
diff --git a/res/values-sw340dp-port/styles.xml b/res/values-sw340dp-port/styles.xml
index 84d43df..c006b85 100644
--- a/res/values-sw340dp-port/styles.xml
+++ b/res/values-sw340dp-port/styles.xml
@@ -21,8 +21,15 @@
<!-- Workspace -->
<style name="QSBBar">
<item name="android:orientation">horizontal</item>
- <item name="android:layout_width">320dp</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>
+ <item name="android:paddingLeft">@dimen/workspace_divider_padding_left</item>
+ <item name="android:paddingRight">@dimen/workspace_divider_padding_right</item>
+ </style>
+ <style name="SearchButton">
+ <item name="android:layout_gravity">center_vertical</item>
+ <item name="android:paddingTop">@dimen/toolbar_button_vertical_padding</item>
+ <item name="android:paddingBottom">@dimen/toolbar_button_vertical_padding</item>
</style>
</resources>
diff --git a/res/values/dimens.xml b/res/values/dimens.xml
index 512419a..e5e1b3f 100644
--- a/res/values/dimens.xml
+++ b/res/values/dimens.xml
@@ -20,6 +20,7 @@
<!-- Workspace -->
<dimen name="qsb_bar_height">40dp</dimen>
+ <dimen name="search_bar_height">44dp</dimen>
<dimen name="workspace_cell_width">80dp</dimen>
<dimen name="workspace_cell_height">100dp</dimen>
<dimen name="workspace_width_gap">-1dp</dimen>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index b510566..9372dbe 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -145,10 +145,10 @@
<item name="android:paddingRight">25dp</item>
<item name="android:textColor">#FFFFFFFF</item>
<item name="android:textSize">16sp</item>
- <item name="android:shadowColor">#393939</item>
+ <item name="android:shadowColor">#DD000000</item>
<item name="android:shadowDx">0.0</item>
- <item name="android:shadowDy">0.0</item>
- <item name="android:shadowRadius">2.0</item>
+ <item name="android:shadowDy">1.0</item>
+ <item name="android:shadowRadius">4.0</item>
</style>
<style name="TabIndicator">
diff --git a/src/com/android/launcher2/AppWidgetResizeFrame.java b/src/com/android/launcher2/AppWidgetResizeFrame.java
index c7dbc0f..4762193 100644
--- a/src/com/android/launcher2/AppWidgetResizeFrame.java
+++ b/src/com/android/launcher2/AppWidgetResizeFrame.java
@@ -64,11 +64,13 @@
public static final int RIGHT = 2;
public static final int BOTTOM = 3;
+ private Launcher mLauncher;
+
public AppWidgetResizeFrame(Context context, ItemInfo itemInfo,
LauncherAppWidgetHostView widgetView, CellLayout cellLayout, DragLayer dragLayer) {
super(context);
- mContext = context;
+ mLauncher = (Launcher) context;
mItemInfo = itemInfo;
mCellLayout = cellLayout;
mWidgetView = widgetView;
@@ -77,7 +79,7 @@
mWorkspace = (Workspace) dragLayer.findViewById(R.id.workspace);
final AppWidgetProviderInfo info = widgetView.getAppWidgetInfo();
- int[] result = mCellLayout.rectToCell(info.minResizeWidth, info.minResizeHeight, null);
+ int[] result = mLauncher.getMinResizeSpanForWidget(info, null);
mMinHSpan = result[0];
mMinVSpan = result[1];
@@ -123,7 +125,7 @@
mRightHandle.setVisibility(GONE);
}
- final float density = mContext.getResources().getDisplayMetrics().density;
+ final float density = mLauncher.getResources().getDisplayMetrics().density;
mBackgroundPadding = (int) Math.ceil(density * BACKGROUND_PADDING);
mTouchTargetWidth = 2 * mBackgroundPadding;
}
diff --git a/src/com/android/launcher2/BubbleTextView.java b/src/com/android/launcher2/BubbleTextView.java
index e25ce5c..79e27b0 100644
--- a/src/com/android/launcher2/BubbleTextView.java
+++ b/src/com/android/launcher2/BubbleTextView.java
@@ -43,8 +43,8 @@
static final float SHADOW_LARGE_RADIUS = 4.0f;
static final float SHADOW_SMALL_RADIUS = 1.75f;
static final float SHADOW_Y_OFFSET = 2.0f;
- static final int SHADOW_LARGE_COLOUR = 0xCC000000;
- static final int SHADOW_SMALL_COLOUR = 0xBB000000;
+ static final int SHADOW_LARGE_COLOUR = 0xDD000000;
+ static final int SHADOW_SMALL_COLOUR = 0xCC000000;
static final float PADDING_H = 8.0f;
static final float PADDING_V = 3.0f;
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index c3edb99..29f3f25 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -902,6 +902,10 @@
return getSpanForWidget(info.provider, info.minWidth, info.minHeight, spanXY);
}
+ int[] getMinResizeSpanForWidget(AppWidgetProviderInfo info, int[] spanXY) {
+ return getSpanForWidget(info.provider, info.minResizeWidth, info.minResizeHeight, spanXY);
+ }
+
int[] getSpanForWidget(PendingAddWidgetInfo info, int[] spanXY) {
return getSpanForWidget(info.componentName, info.minWidth, info.minHeight, spanXY);
}
@@ -2577,7 +2581,7 @@
if (activityName != null) {
int coi = getCurrentOrientationIndexForGlobalIcons();
sGlobalSearchIcon[coi] = updateButtonWithIconFromExternalActivity(
- R.id.search_button, activityName, R.drawable.ic_search_normal_holo);
+ R.id.search_button, activityName, R.drawable.ic_home_search_normal_holo);
searchButton.setVisibility(View.VISIBLE);
if (searchDivider != null) searchDivider.setVisibility(View.VISIBLE);
} else {
@@ -2601,7 +2605,7 @@
if (activityName != null) {
int coi = getCurrentOrientationIndexForGlobalIcons();
sVoiceSearchIcon[coi] = updateButtonWithIconFromExternalActivity(
- R.id.voice_button, activityName, R.drawable.ic_voice_search_holo);
+ R.id.voice_button, activityName, R.drawable.ic_home_voice_search_holo);
if (searchDivider != null) searchDivider.setVisibility(View.VISIBLE);
voiceButton.setVisibility(View.VISIBLE);
} else {