[MOD][GUIDE][v2.0] Sense 4.0 style Multitasking on Stock ICS [Added Reflection]

Search This thread

evilisto

Senior Member
Nov 26, 2010
486
2,318
0
-----------------------------------------------------------------------------
v1.1 to v2.0
- added thumbnail reflection thanks to D4rKn3sSyS and Neil Davies :)
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
v1.0 to v1.1
- removed all resources (png files) : for other screen size devices..
- minor layout fixes.
- added landscape layout.
-----------------------------------------------------------------------------

This mod is originally posted on Nexus S theme forum :

[MOD] Sense 4.0 style Multitasking on Stock ICS

Preview :

AfkNN.png



This mod is related to SystemUI.apk and framework-res.apk, so making universal version for all devices and all roms is impossible. So here I post my source code for other users.. :)

-----------------------------------------------------------------------------

* Caution : All values are (basically) for HDPI=WVGA devices *


How to :
1) Apply patch(diff).
2) Compile.
3) Done :)


* diff v2.0 : Download

Code:
diff -rupN ./a/core/res/res/values/dimens.xml ./b/core/res/res/values/dimens.xml
--- ./a/core/res/res/values/dimens.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/core/res/res/values/dimens.xml	2012-04-27 00:22:57.951903000 +0900
@@ -19,9 +19,9 @@
 -->
 <resources>
     <!-- The width that is used when creating thumbnails of applications. -->
-    <dimen name="thumbnail_width">120dp</dimen>
+    <dimen name="thumbnail_width">168dp</dimen>
     <!-- The height that is used when creating thumbnails of applications. -->
-    <dimen name="thumbnail_height">120dp</dimen>
+    <dimen name="thumbnail_height">267dp</dimen>
     <!-- The standard size (both width and height) of an application icon that
          will be displayed in the app launcher and elsewhere. -->
     <dimen name="app_icon_size">48dip</dimen>
diff -rupN ./a/packages/SystemUI/res/drawable/status_bar_recents_background.xml ./b/packages/SystemUI/res/drawable/status_bar_recents_background.xml
--- ./a/packages/SystemUI/res/drawable/status_bar_recents_background.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/drawable/status_bar_recents_background.xml	2012-04-26 19:18:32.766622000 +0900
@@ -16,10 +16,11 @@
  * limitations under the License.
  */
 -->
-<shape xmlns:android="http://schemas.android.com/apk/res/android">
+<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
     <gradient name="status_bar_recents_background"
-        android:startColor="#e6000000"
-        android:endColor="#c0000000"
-        android:angle="@integer/status_bar_recents_bg_gradient_degrees"
+        android:type="radial"
+        android:startColor="#ff4a4a4a"
+        android:endColor="#ff080808"
+        android:gradientRadius="400"
         />
 </shape>
diff -rupN ./a/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml ./b/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml
--- ./a/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml	2012-04-26 19:54:23.777459000 +0900
@@ -32,5 +32,6 @@
         android:text="@string/status_bar_no_recent_apps"
         android:gravity="center_horizontal"
         android:layout_gravity="center"
+        android:visibility="gone"
     />
 </FrameLayout>
diff -rupN ./a/packages/SystemUI/res/layout-land/status_bar_recent_item.xml ./b/packages/SystemUI/res/layout-land/status_bar_recent_item.xml
--- ./a/packages/SystemUI/res/layout-land/status_bar_recent_item.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/layout-land/status_bar_recent_item.xml	2012-05-07 04:53:08.705255000 +0900
@@ -22,55 +22,53 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_height="match_parent"
     android:layout_width="wrap_content"
-    android:paddingLeft="@dimen/status_bar_recents_item_padding"
-    android:paddingRight="@dimen/status_bar_recents_item_padding">
+    android:paddingRight="@dimen/status_bar_recents_item_padding"
+    android:paddingLeft="@dimen/status_bar_recents_item_padding">
 
     <RelativeLayout android:id="@+id/recent_item"
         android:layout_gravity="center_vertical"
         android:layout_height="wrap_content"
         android:layout_width="wrap_content"
-        android:paddingTop="@*android:dimen/status_bar_height">
+        android:paddingTop="@*android:dimen/status_bar_height"
+        android:layout_centerInParent="true">
 
         <FrameLayout android:id="@+id/app_thumbnail"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignParentLeft="true"
-            android:layout_alignParentTop="true"
-            android:layout_marginTop="@dimen/status_bar_recents_thumbnail_top_margin"
-            android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
-            android:background="@drawable/recents_thumbnail_bg"
-            android:foreground="@drawable/recents_thumbnail_fg"
+            android:layout_centerInParent="true"
+            android:background="#00000000"
+            android:foreground="#00000000"
             android:visibility="invisible">
             <ImageView android:id="@+id/app_thumbnail_image"
-                android:layout_width="@dimen/status_bar_recents_thumbnail_width"
-                android:layout_height="@dimen/status_bar_recents_thumbnail_height"
+                android:layout_width="120.0dip"
+                android:layout_height="320.0dip"
+                android:scaleType="centerInside"
             />
         </FrameLayout>
 
         <ImageView android:id="@+id/app_icon"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
-            android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
-            android:layout_alignParentLeft="true"
-            android:layout_alignParentTop="true"
-            android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
-            android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
+            android:gravity="center_horizontal"
+            android:layout_marginTop="232.0dip"
+            android:maxWidth="35dp"
+            android:maxHeight="35dp"
             android:scaleType="centerInside"
             android:adjustViewBounds="true"
         />
 
         <TextView android:id="@+id/app_label"
-            android:layout_width="@dimen/status_bar_recents_app_label_width"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:textSize="@dimen/status_bar_recents_app_label_text_size"
-            android:fadingEdge="horizontal"
-            android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
+            android:gravity="center_horizontal"
+            android:textSize="12dip"
+            android:fadingEdge="none"
+            android:fadingEdgeLength="0.0dip"
             android:scrollHorizontally="true"
-            android:layout_alignLeft="@id/app_thumbnail"
-            android:layout_below="@id/app_thumbnail"
-            android:layout_marginTop="@dimen/status_bar_recents_text_description_padding"
-            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
+            android:layout_below="@id/app_icon"
+            android:layout_alignParentBottom="true"
+            android:paddingTop="0.0dip"
+            android:layout_marginTop="0.0dip"
             android:singleLine="true"
             android:ellipsize="marquee"
             android:textColor="@color/status_bar_recents_app_label_color"
@@ -80,12 +78,13 @@
             android:layout_width="@dimen/status_bar_recents_app_label_width"
             android:layout_height="wrap_content"
             android:textSize="@dimen/status_bar_recents_app_description_text_size"
-            android:fadingEdge="horizontal"
-            android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
+            android:fadingEdge="none"
+            android:fadingEdgeLength="0dip"
             android:scrollHorizontally="true"
-            android:layout_alignLeft="@id/app_thumbnail"
+            android:layout_alignParentBottom="true"
+            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
             android:layout_below="@id/app_label"
-            android:layout_marginTop="@dimen/status_bar_recents_text_description_padding"
+            android:layout_marginTop="3.0dip"
             android:singleLine="true"
             android:ellipsize="marquee"
         />
diff -rupN ./a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml ./b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
--- ./a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml	2012-04-27 14:05:59.391168000 +0900
@@ -29,27 +29,33 @@
         android:background="@drawable/status_bar_recents_background"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_alignParentBottom="true"
-        android:clipToPadding="false"
-        android:clipChildren="false">
-
-        <com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container"
-            android:layout_width="wrap_content"
-            android:layout_height="match_parent"
-            android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin"
-            android:divider="@null"
-            android:stackFromBottom="true"
-            android:fadingEdge="horizontal"
-            android:scrollbars="none"
-            android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
-            android:layout_gravity="bottom|left"
-            android:orientation="horizontal"
-            android:clipToPadding="false"
-            android:clipChildren="false">
+        android:layout_centerVertical="true">
+
+        <ImageView
+ 	    android:gravity="center"
+	    android:layout_width="match_parent"
+ 	    android:layout_height="match_parent"
+	    android:layout_marginTop="0.0dip"
+  	    android:src="@drawable/status_bar_recents_background"
+        />
+
+        <com.android.systemui.recent.RecentsHorizontalScrollView
+	    android:id="@+id/recents_container"
+	    android:layout_gravity="bottom|left|center"
+	    android:scrollbars="none"
+	    android:fadingEdge="none"
+	    android:fadingEdgeLength="0.0dip"
+	    android:clipChildren="false"
+	    android:clipToPadding="false"
+    	    android:layout_width="match_parent"
+	    android:layout_height="wrap_content"
+	    android:layout_marginRight="0.0dip"
+	    android:stackFromBottom="true"
+	    android:divider="@null">
 
             <LinearLayout android:id="@+id/recents_linear_layout"
-                android:layout_width="wrap_content"
-                android:layout_height="match_parent"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
                 android:orientation="horizontal"
                 android:clipToPadding="false"
                 android:clipChildren="false">
@@ -57,6 +63,16 @@
 
         </com.android.systemui.recent.RecentsHorizontalScrollView>
 
+	<TextView
+	    android:textSize="18.0dip"
+	    android:textColor="#ffe5e5e5"
+	    android:gravity="center_horizontal"
+	    android:layout_marginTop="10.0dip"
+	    android:layout_width="match_parent"
+	    android:layout_height="wrap_content"
+	    android:text="@string/recent_apps_title"
+	/>
+
     </FrameLayout>
 
     <include layout="@layout/status_bar_no_recent_apps"
diff -rupN ./a/packages/SystemUI/res/layout-port/status_bar_recent_item.xml ./b/packages/SystemUI/res/layout-port/status_bar_recent_item.xml
--- ./a/packages/SystemUI/res/layout-port/status_bar_recent_item.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/layout-port/status_bar_recent_item.xml	2012-05-07 04:31:12.435246000 +0900
@@ -20,69 +20,62 @@
 
 <FrameLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_height="wrap_content"
-    android:layout_width="match_parent"
-    android:paddingTop="@dimen/status_bar_recents_item_padding"
-    android:paddingBottom="@dimen/status_bar_recents_item_padding">
+    android:layout_height="match_parent"
+    android:layout_width="wrap_content"
+    android:paddingRight="@dimen/status_bar_recents_item_padding"
+    android:paddingLeft="@dimen/status_bar_recents_item_padding">
 
     <RelativeLayout android:id="@+id/recent_item"
-        android:layout_gravity="center_horizontal"
+        android:layout_gravity="center_vertical"
         android:layout_height="wrap_content"
-        android:layout_width="wrap_content">
+        android:layout_width="wrap_content"
+        android:paddingTop="@*android:dimen/status_bar_height"
+        android:layout_centerInParent="true">
 
-        <TextView android:id="@+id/app_label"
-            android:layout_width="@dimen/status_bar_recents_app_label_width"
-            android:layout_height="wrap_content"
-            android:textSize="@dimen/status_bar_recents_app_label_text_size"
-            android:fadingEdge="horizontal"
-            android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
-            android:scrollHorizontally="true"
-            android:layout_alignParentLeft="true"
-            android:layout_alignTop="@id/app_icon"
-            android:paddingTop="2dp"
-            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
-            android:singleLine="true"
-            android:ellipsize="marquee"
-            android:textColor="@color/status_bar_recents_app_label_color"
-        />
         <FrameLayout android:id="@+id/app_thumbnail"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_alignParentTop="true"
-            android:layout_toRightOf="@id/app_label"
-            android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
-            android:background="@drawable/recents_thumbnail_bg"
-            android:foreground="@drawable/recents_thumbnail_fg"
+            android:layout_centerInParent="true"
+            android:background="#00000000"
+            android:foreground="#00000000"
             android:visibility="invisible">
             <ImageView android:id="@+id/app_thumbnail_image"
-                android:layout_width="@dimen/status_bar_recents_thumbnail_width"
-                android:layout_height="@dimen/status_bar_recents_thumbnail_height"
+                android:paddingTop="60dip"
+                android:layout_marginTop="30.0dip"
+                android:layout_width="212.0dip"
+                android:layout_height="455.0dip"
+                android:scaleType="centerInside"
             />
         </FrameLayout>
-        <View android:id="@+id/recents_callout_line"
-            android:layout_width="@dimen/status_bar_recents_app_label_width"
-            android:layout_height="1dip"
-            android:layout_alignParentLeft="true"
-            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
-            android:layout_toLeftOf="@id/app_thumbnail"
-            android:layout_below="@id/app_label"
-            android:layout_marginRight="3dip"
-            android:layout_marginTop="3dip"
-            android:background="@drawable/recents_callout_line"
-        />
 
         <ImageView android:id="@+id/app_icon"
-            android:layout_width="wrap_content"
+            android:layout_width="match_parent"
             android:layout_height="wrap_content"
-            android:layout_toRightOf="@id/app_label"
-            android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
-            android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
+            android:gravity="center_horizontal"
+            android:layout_marginTop="405.0dip"
             android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
             android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
             android:scaleType="centerInside"
             android:adjustViewBounds="true"
         />
 
+        <TextView android:id="@+id/app_label"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center_horizontal"
+            android:textSize="@dimen/status_bar_recents_app_label_text_size"
+            android:fadingEdge="none"
+            android:fadingEdgeLength="0.0dip"
+            android:scrollHorizontally="true"
+            android:layout_below="@id/app_icon"
+            android:layout_alignParentBottom="true"
+            android:paddingTop="0.0dip"
+            android:layout_marginTop="3.0dip"
+            android:singleLine="true"
+            android:ellipsize="marquee"
+            android:textColor="@color/status_bar_recents_app_label_color"
+        />
+
         <TextView android:id="@+id/app_description"
             android:layout_width="@dimen/status_bar_recents_app_label_width"
             android:layout_height="wrap_content"
@@ -90,10 +83,10 @@
             android:fadingEdge="horizontal"
             android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
             android:scrollHorizontally="true"
-            android:layout_alignParentLeft="true"
+            android:layout_alignParentBottom="true"
             android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
-            android:layout_below="@id/recents_callout_line"
-            android:layout_marginTop="3dip"
+            android:layout_below="@id/app_label"
+            android:layout_marginTop="40.0dip"
             android:singleLine="true"
             android:ellipsize="marquee"
         />
diff -rupN ./a/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml ./b/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml
--- ./a/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml	2012-04-27 14:11:39.881175000 +0900
@@ -29,31 +29,49 @@
         android:background="@drawable/status_bar_recents_background"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:layout_alignParentBottom="true">
+        android:layout_centerVertical="true">
 
-        <com.android.systemui.recent.RecentsVerticalScrollView
-            android:id="@+id/recents_container"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:layout_marginRight="0dp"
-            android:divider="@null"
-            android:stackFromBottom="true"
-            android:fadingEdge="vertical"
-            android:scrollbars="none"
-            android:fadingEdgeLength="@*android:dimen/status_bar_height"
-            android:layout_gravity="bottom|left"
-            android:clipToPadding="false"
-            android:clipChildren="false">
+        <ImageView
+	    android:gravity="center"
+	    android:layout_width="match_parent"
+	    android:layout_height="match_parent"
+	    android:layout_marginTop="0.0dip"
+	    android:src="@drawable/status_bar_recents_background"
+	/>
+
+        <com.android.systemui.recent.RecentsHorizontalScrollView
+	    android:id="@+id/recents_container"
+	    android:layout_gravity="bottom|left|center"
+	    android:scrollbars="none"
+	    android:fadingEdge="none"
+	    android:fadingEdgeLength="0.0dip"
+	    android:clipChildren="false"
+	    android:clipToPadding="false"
+    	    android:layout_width="match_parent"
+	    android:layout_height="wrap_content"
+	    android:layout_marginRight="0.0dip"
+	    android:stackFromBottom="true"
+	    android:divider="@null">
 
             <LinearLayout android:id="@+id/recents_linear_layout"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
-                android:orientation="vertical"
+                android:orientation="horizontal"
                 android:clipToPadding="false"
                 android:clipChildren="false">
             </LinearLayout>
 
-        </com.android.systemui.recent.RecentsVerticalScrollView>
+        </com.android.systemui.recent.RecentsHorizontalScrollView>
+
+	<TextView
+	    android:textSize="20.0dip"
+	    android:textColor="#ffe5e5e5"
+	    android:gravity="center_horizontal"
+	    android:layout_marginTop="45.0dip"
+	    android:layout_width="match_parent"
+	    android:layout_height="wrap_content"
+	    android:text="@string/recent_apps_title"
+	/>
 
     </FrameLayout>
 
diff -rupN ./a/packages/SystemUI/res/values/colors.xml ./b/packages/SystemUI/res/values/colors.xml
--- ./a/packages/SystemUI/res/values/colors.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/values/colors.xml	2012-04-26 19:46:08.367467000 +0900
@@ -22,8 +22,8 @@
     <drawable name="notification_item_background_color_pressed">#ff257390</drawable>
     <drawable name="ticker_background_color">#ff1d1d1d</drawable>
     <drawable name="status_bar_background">#ff000000</drawable>
-    <drawable name="status_bar_recents_background_solid">#b3000000</drawable>
-    <drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable>
+    <drawable name="status_bar_recents_background_solid">#00000000</drawable>
+    <drawable name="status_bar_recents_app_thumbnail_background">#00000000</drawable>
     <color name="status_bar_recents_app_label_color">#ffffffff</color>
     <drawable name="status_bar_notification_row_background_color">#ff090909</drawable>
     <drawable name="notification_header_bg">#FF000000</drawable>
diff -rupN ./a/packages/SystemUI/res/values/config.xml ./b/packages/SystemUI/res/values/config.xml
--- ./a/packages/SystemUI/res/values/config.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/values/config.xml	2012-04-26 20:20:19.237457000 +0900
@@ -27,7 +27,7 @@
 
     <!-- Whether recents thumbnails should stretch in both x and y to fill their
      ImageView -->
-    <bool name="config_recents_thumbnail_image_fits_to_xy">false</bool>
+    <bool name="config_recents_thumbnail_image_fits_to_xy">true</bool>
 
     <!-- Control whether status bar should distinguish HSPA data icon form UMTS
     data icon on devices -->
diff -rupN ./a/packages/SystemUI/res/values/dimens.xml ./b/packages/SystemUI/res/values/dimens.xml
--- ./a/packages/SystemUI/res/values/dimens.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/values/dimens.xml	2012-04-26 20:31:54.317462000 +0900
@@ -21,9 +21,9 @@
 
     <!-- Recent Applications parameters -->
     <!-- Upper width limit for application icon -->
-    <dimen name="status_bar_recents_app_icon_max_width">48dp</dimen>
+    <dimen name="status_bar_recents_app_icon_max_width">42dp</dimen>
     <!-- Upper height limit for application icon -->
-    <dimen name="status_bar_recents_app_icon_max_height">48dp</dimen>
+    <dimen name="status_bar_recents_app_icon_max_height">42dp</dimen>
 
     <!-- Size of application thumbnail -->
     <dimen name="status_bar_recents_thumbnail_width">164dp</dimen>
diff -rupN ./a/packages/SystemUI/res/values/strings.xml ./b/packages/SystemUI/res/values/strings.xml
--- ./a/packages/SystemUI/res/values/strings.xml	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/res/values/strings.xml	2012-04-30 10:53:24.049658000 +0900
@@ -377,4 +377,8 @@
 
     <!-- Content description of the clear button in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
     <string name="accessibility_clear_all">Clear all notifications.</string>
+
+    <!-- for Sense 4.0 style multitasking mod -->
+    <string name="recent_apps_title">Recent apps</string>
+
 </resources>
diff -rupN ./a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java ./b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
--- ./a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java	2012-04-25 11:31:16.000000000 +0900
+++ ./b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java	2012-05-07 04:30:21.215261000 +0900
@@ -24,9 +24,17 @@ import android.content.Intent;
 import android.content.res.Configuration;
 import android.content.res.Resources;
 import android.graphics.Bitmap;
+import android.graphics.drawable.BitmapDrawable;
 import android.graphics.Matrix;
 import android.graphics.Shader.TileMode;
-import android.graphics.drawable.BitmapDrawable;
+import android.graphics.Color;
+import android.graphics.Canvas;
+import android.graphics.LinearGradient;
+import android.graphics.Paint;
+import android.graphics.PorterDuffXfermode;
+import android.graphics.Bitmap.Config;
+import android.graphics.PorterDuff.Mode;
+import android.graphics.Shader.TileMode;
 import android.net.Uri;
 import android.provider.Settings;
 import android.util.AttributeSet;
@@ -402,7 +410,32 @@ public class RecentsPanelView extends Re
             // Should remove the default image in the frame
             // that this now covers, to improve scrolling speed.
             // That can't be done until the anim is complete though.
-            h.thumbnailViewImage.setImageBitmap(thumbnail);
+            final int reflectionGap = 4;
+            int width = thumbnail.getWidth();
+            int height = thumbnail.getHeight();
+	
+            Matrix matrix = new Matrix();
+            matrix.preScale(1, -1);
+	
+            Bitmap reflectionImage = Bitmap.createBitmap(thumbnail, 0, height * 2 / 3, width, height/3, matrix, false);	    
+            Bitmap bitmapWithReflection = Bitmap.createBitmap(width, (height + height/3), Config.ARGB_8888);
+	      
+            Canvas canvas = new Canvas(bitmapWithReflection);
+            canvas.drawBitmap(thumbnail, 0, 0, null);
+            Paint defaultPaint = new Paint();
+            canvas.drawRect(0, height, width, height + reflectionGap, defaultPaint);
+            canvas.drawBitmap(reflectionImage, 0, height + reflectionGap, null);
+	        
+            Paint paint = new Paint(); 
+            LinearGradient shader = new LinearGradient(0, thumbnail.getHeight(), 0, 
+              bitmapWithReflection.getHeight() + reflectionGap, 0x70ffffff, 0x00ffffff, 
+              TileMode.CLAMP); 
+            paint.setShader(shader); 
+            paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN)); 
+            canvas.drawRect(0, height, width, 
+              bitmapWithReflection.getHeight() + reflectionGap, paint); 
+
+            h.thumbnailViewImage.setImageBitmap(bitmapWithReflection);
 
             // scale the image to fill the full width of the ImageView. do this only if
             // we haven't set a bitmap before, or if the bitmap size has changed
@@ -410,7 +443,7 @@ public class RecentsPanelView extends Re
                 h.thumbnailViewImageBitmap.getWidth() != thumbnail.getWidth() ||
                 h.thumbnailViewImageBitmap.getHeight() != thumbnail.getHeight()) {
                 if (mFitThumbnailToXY) {
-                    h.thumbnailViewImage.setScaleType(ScaleType.FIT_XY);
+                    h.thumbnailViewImage.setRotationY(25.0f);
                 } else {
                     Matrix scaleMatrix = new Matrix();
                     float scale = mThumbnailWidth / (float) thumbnail.getWidth();

-----------------------------------------------------------------------------

Thanks to brucekey in rootzwiki
(this mod is based on his WEBAOKP mod.)

-----------------------------------------------------------------------------
-----------------------------------------------------------------------------

and Thanks to D4rKn3sSyS and Neil Davies
for image reflection source code.


-----------------------------------------------------------------------------
 
Last edited:

D4rKn3sSyS

Inactive Recognized Developer
Jan 12, 2011
3,800
16,277
0
Medellín
This is really cool, already modded for samsung galaxy s2 :).
EDIT: Your zip only bricks input method on sgs2, I had to build from sources duh! :p, anyway its working as it should now
 
Last edited:
G

GuestK00408

Guest
evilisto, any help with terminal command?

I'm putting:

Code:
patch -p0 -i Sense-4.0-Multitasking.patch

And that returns a hunk error. Any help would be great as I have limited experience with linux (running ubuntu 11)
 

randomchars

Senior Member
Apr 9, 2010
211
102
0
Budapest
I think it should be clearly stated in the op that this doesn't work with apktool. You need to compile it from sources.


Are you????!!! That's for windows and in case you haven't noticed...this is android.

In case you haven't noticed... you need to work on your reading comprehension :D
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 56
    -----------------------------------------------------------------------------
    v1.1 to v2.0
    - added thumbnail reflection thanks to D4rKn3sSyS and Neil Davies :)
    -----------------------------------------------------------------------------

    -----------------------------------------------------------------------------
    v1.0 to v1.1
    - removed all resources (png files) : for other screen size devices..
    - minor layout fixes.
    - added landscape layout.
    -----------------------------------------------------------------------------

    This mod is originally posted on Nexus S theme forum :

    [MOD] Sense 4.0 style Multitasking on Stock ICS

    Preview :

    AfkNN.png



    This mod is related to SystemUI.apk and framework-res.apk, so making universal version for all devices and all roms is impossible. So here I post my source code for other users.. :)

    -----------------------------------------------------------------------------

    * Caution : All values are (basically) for HDPI=WVGA devices *


    How to :
    1) Apply patch(diff).
    2) Compile.
    3) Done :)


    * diff v2.0 : Download

    Code:
    diff -rupN ./a/core/res/res/values/dimens.xml ./b/core/res/res/values/dimens.xml
    --- ./a/core/res/res/values/dimens.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/core/res/res/values/dimens.xml	2012-04-27 00:22:57.951903000 +0900
    @@ -19,9 +19,9 @@
     -->
     <resources>
         <!-- The width that is used when creating thumbnails of applications. -->
    -    <dimen name="thumbnail_width">120dp</dimen>
    +    <dimen name="thumbnail_width">168dp</dimen>
         <!-- The height that is used when creating thumbnails of applications. -->
    -    <dimen name="thumbnail_height">120dp</dimen>
    +    <dimen name="thumbnail_height">267dp</dimen>
         <!-- The standard size (both width and height) of an application icon that
              will be displayed in the app launcher and elsewhere. -->
         <dimen name="app_icon_size">48dip</dimen>
    diff -rupN ./a/packages/SystemUI/res/drawable/status_bar_recents_background.xml ./b/packages/SystemUI/res/drawable/status_bar_recents_background.xml
    --- ./a/packages/SystemUI/res/drawable/status_bar_recents_background.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/drawable/status_bar_recents_background.xml	2012-04-26 19:18:32.766622000 +0900
    @@ -16,10 +16,11 @@
      * limitations under the License.
      */
     -->
    -<shape xmlns:android="http://schemas.android.com/apk/res/android">
    +<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
         <gradient name="status_bar_recents_background"
    -        android:startColor="#e6000000"
    -        android:endColor="#c0000000"
    -        android:angle="@integer/status_bar_recents_bg_gradient_degrees"
    +        android:type="radial"
    +        android:startColor="#ff4a4a4a"
    +        android:endColor="#ff080808"
    +        android:gradientRadius="400"
             />
     </shape>
    diff -rupN ./a/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml ./b/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml
    --- ./a/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml	2012-04-26 19:54:23.777459000 +0900
    @@ -32,5 +32,6 @@
             android:text="@string/status_bar_no_recent_apps"
             android:gravity="center_horizontal"
             android:layout_gravity="center"
    +        android:visibility="gone"
         />
     </FrameLayout>
    diff -rupN ./a/packages/SystemUI/res/layout-land/status_bar_recent_item.xml ./b/packages/SystemUI/res/layout-land/status_bar_recent_item.xml
    --- ./a/packages/SystemUI/res/layout-land/status_bar_recent_item.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/layout-land/status_bar_recent_item.xml	2012-05-07 04:53:08.705255000 +0900
    @@ -22,55 +22,53 @@
         xmlns:android="http://schemas.android.com/apk/res/android"
         android:layout_height="match_parent"
         android:layout_width="wrap_content"
    -    android:paddingLeft="@dimen/status_bar_recents_item_padding"
    -    android:paddingRight="@dimen/status_bar_recents_item_padding">
    +    android:paddingRight="@dimen/status_bar_recents_item_padding"
    +    android:paddingLeft="@dimen/status_bar_recents_item_padding">
     
         <RelativeLayout android:id="@+id/recent_item"
             android:layout_gravity="center_vertical"
             android:layout_height="wrap_content"
             android:layout_width="wrap_content"
    -        android:paddingTop="@*android:dimen/status_bar_height">
    +        android:paddingTop="@*android:dimen/status_bar_height"
    +        android:layout_centerInParent="true">
     
             <FrameLayout android:id="@+id/app_thumbnail"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
    -            android:layout_alignParentLeft="true"
    -            android:layout_alignParentTop="true"
    -            android:layout_marginTop="@dimen/status_bar_recents_thumbnail_top_margin"
    -            android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
    -            android:background="@drawable/recents_thumbnail_bg"
    -            android:foreground="@drawable/recents_thumbnail_fg"
    +            android:layout_centerInParent="true"
    +            android:background="#00000000"
    +            android:foreground="#00000000"
                 android:visibility="invisible">
                 <ImageView android:id="@+id/app_thumbnail_image"
    -                android:layout_width="@dimen/status_bar_recents_thumbnail_width"
    -                android:layout_height="@dimen/status_bar_recents_thumbnail_height"
    +                android:layout_width="120.0dip"
    +                android:layout_height="320.0dip"
    +                android:scaleType="centerInside"
                 />
             </FrameLayout>
     
             <ImageView android:id="@+id/app_icon"
    -            android:layout_width="wrap_content"
    +            android:layout_width="match_parent"
                 android:layout_height="wrap_content"
    -            android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
    -            android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
    -            android:layout_alignParentLeft="true"
    -            android:layout_alignParentTop="true"
    -            android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
    -            android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
    +            android:gravity="center_horizontal"
    +            android:layout_marginTop="232.0dip"
    +            android:maxWidth="35dp"
    +            android:maxHeight="35dp"
                 android:scaleType="centerInside"
                 android:adjustViewBounds="true"
             />
     
             <TextView android:id="@+id/app_label"
    -            android:layout_width="@dimen/status_bar_recents_app_label_width"
    +            android:layout_width="match_parent"
                 android:layout_height="wrap_content"
    -            android:textSize="@dimen/status_bar_recents_app_label_text_size"
    -            android:fadingEdge="horizontal"
    -            android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
    +            android:gravity="center_horizontal"
    +            android:textSize="12dip"
    +            android:fadingEdge="none"
    +            android:fadingEdgeLength="0.0dip"
                 android:scrollHorizontally="true"
    -            android:layout_alignLeft="@id/app_thumbnail"
    -            android:layout_below="@id/app_thumbnail"
    -            android:layout_marginTop="@dimen/status_bar_recents_text_description_padding"
    -            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
    +            android:layout_below="@id/app_icon"
    +            android:layout_alignParentBottom="true"
    +            android:paddingTop="0.0dip"
    +            android:layout_marginTop="0.0dip"
                 android:singleLine="true"
                 android:ellipsize="marquee"
                 android:textColor="@color/status_bar_recents_app_label_color"
    @@ -80,12 +78,13 @@
                 android:layout_width="@dimen/status_bar_recents_app_label_width"
                 android:layout_height="wrap_content"
                 android:textSize="@dimen/status_bar_recents_app_description_text_size"
    -            android:fadingEdge="horizontal"
    -            android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
    +            android:fadingEdge="none"
    +            android:fadingEdgeLength="0dip"
                 android:scrollHorizontally="true"
    -            android:layout_alignLeft="@id/app_thumbnail"
    +            android:layout_alignParentBottom="true"
    +            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
                 android:layout_below="@id/app_label"
    -            android:layout_marginTop="@dimen/status_bar_recents_text_description_padding"
    +            android:layout_marginTop="3.0dip"
                 android:singleLine="true"
                 android:ellipsize="marquee"
             />
    diff -rupN ./a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml ./b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml
    --- ./a/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/layout-land/status_bar_recent_panel.xml	2012-04-27 14:05:59.391168000 +0900
    @@ -29,27 +29,33 @@
             android:background="@drawable/status_bar_recents_background"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
    -        android:layout_alignParentBottom="true"
    -        android:clipToPadding="false"
    -        android:clipChildren="false">
    -
    -        <com.android.systemui.recent.RecentsHorizontalScrollView android:id="@+id/recents_container"
    -            android:layout_width="wrap_content"
    -            android:layout_height="match_parent"
    -            android:layout_marginRight="@dimen/status_bar_recents_right_glow_margin"
    -            android:divider="@null"
    -            android:stackFromBottom="true"
    -            android:fadingEdge="horizontal"
    -            android:scrollbars="none"
    -            android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
    -            android:layout_gravity="bottom|left"
    -            android:orientation="horizontal"
    -            android:clipToPadding="false"
    -            android:clipChildren="false">
    +        android:layout_centerVertical="true">
    +
    +        <ImageView
    + 	    android:gravity="center"
    +	    android:layout_width="match_parent"
    + 	    android:layout_height="match_parent"
    +	    android:layout_marginTop="0.0dip"
    +  	    android:src="@drawable/status_bar_recents_background"
    +        />
    +
    +        <com.android.systemui.recent.RecentsHorizontalScrollView
    +	    android:id="@+id/recents_container"
    +	    android:layout_gravity="bottom|left|center"
    +	    android:scrollbars="none"
    +	    android:fadingEdge="none"
    +	    android:fadingEdgeLength="0.0dip"
    +	    android:clipChildren="false"
    +	    android:clipToPadding="false"
    +    	    android:layout_width="match_parent"
    +	    android:layout_height="wrap_content"
    +	    android:layout_marginRight="0.0dip"
    +	    android:stackFromBottom="true"
    +	    android:divider="@null">
     
                 <LinearLayout android:id="@+id/recents_linear_layout"
    -                android:layout_width="wrap_content"
    -                android:layout_height="match_parent"
    +                android:layout_width="match_parent"
    +                android:layout_height="wrap_content"
                     android:orientation="horizontal"
                     android:clipToPadding="false"
                     android:clipChildren="false">
    @@ -57,6 +63,16 @@
     
             </com.android.systemui.recent.RecentsHorizontalScrollView>
     
    +	<TextView
    +	    android:textSize="18.0dip"
    +	    android:textColor="#ffe5e5e5"
    +	    android:gravity="center_horizontal"
    +	    android:layout_marginTop="10.0dip"
    +	    android:layout_width="match_parent"
    +	    android:layout_height="wrap_content"
    +	    android:text="@string/recent_apps_title"
    +	/>
    +
         </FrameLayout>
     
         <include layout="@layout/status_bar_no_recent_apps"
    diff -rupN ./a/packages/SystemUI/res/layout-port/status_bar_recent_item.xml ./b/packages/SystemUI/res/layout-port/status_bar_recent_item.xml
    --- ./a/packages/SystemUI/res/layout-port/status_bar_recent_item.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/layout-port/status_bar_recent_item.xml	2012-05-07 04:31:12.435246000 +0900
    @@ -20,69 +20,62 @@
     
     <FrameLayout
         xmlns:android="http://schemas.android.com/apk/res/android"
    -    android:layout_height="wrap_content"
    -    android:layout_width="match_parent"
    -    android:paddingTop="@dimen/status_bar_recents_item_padding"
    -    android:paddingBottom="@dimen/status_bar_recents_item_padding">
    +    android:layout_height="match_parent"
    +    android:layout_width="wrap_content"
    +    android:paddingRight="@dimen/status_bar_recents_item_padding"
    +    android:paddingLeft="@dimen/status_bar_recents_item_padding">
     
         <RelativeLayout android:id="@+id/recent_item"
    -        android:layout_gravity="center_horizontal"
    +        android:layout_gravity="center_vertical"
             android:layout_height="wrap_content"
    -        android:layout_width="wrap_content">
    +        android:layout_width="wrap_content"
    +        android:paddingTop="@*android:dimen/status_bar_height"
    +        android:layout_centerInParent="true">
     
    -        <TextView android:id="@+id/app_label"
    -            android:layout_width="@dimen/status_bar_recents_app_label_width"
    -            android:layout_height="wrap_content"
    -            android:textSize="@dimen/status_bar_recents_app_label_text_size"
    -            android:fadingEdge="horizontal"
    -            android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
    -            android:scrollHorizontally="true"
    -            android:layout_alignParentLeft="true"
    -            android:layout_alignTop="@id/app_icon"
    -            android:paddingTop="2dp"
    -            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
    -            android:singleLine="true"
    -            android:ellipsize="marquee"
    -            android:textColor="@color/status_bar_recents_app_label_color"
    -        />
             <FrameLayout android:id="@+id/app_thumbnail"
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
    -            android:layout_alignParentTop="true"
    -            android:layout_toRightOf="@id/app_label"
    -            android:layout_marginLeft="@dimen/status_bar_recents_thumbnail_left_margin"
    -            android:background="@drawable/recents_thumbnail_bg"
    -            android:foreground="@drawable/recents_thumbnail_fg"
    +            android:layout_centerInParent="true"
    +            android:background="#00000000"
    +            android:foreground="#00000000"
                 android:visibility="invisible">
                 <ImageView android:id="@+id/app_thumbnail_image"
    -                android:layout_width="@dimen/status_bar_recents_thumbnail_width"
    -                android:layout_height="@dimen/status_bar_recents_thumbnail_height"
    +                android:paddingTop="60dip"
    +                android:layout_marginTop="30.0dip"
    +                android:layout_width="212.0dip"
    +                android:layout_height="455.0dip"
    +                android:scaleType="centerInside"
                 />
             </FrameLayout>
    -        <View android:id="@+id/recents_callout_line"
    -            android:layout_width="@dimen/status_bar_recents_app_label_width"
    -            android:layout_height="1dip"
    -            android:layout_alignParentLeft="true"
    -            android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
    -            android:layout_toLeftOf="@id/app_thumbnail"
    -            android:layout_below="@id/app_label"
    -            android:layout_marginRight="3dip"
    -            android:layout_marginTop="3dip"
    -            android:background="@drawable/recents_callout_line"
    -        />
     
             <ImageView android:id="@+id/app_icon"
    -            android:layout_width="wrap_content"
    +            android:layout_width="match_parent"
                 android:layout_height="wrap_content"
    -            android:layout_toRightOf="@id/app_label"
    -            android:layout_marginLeft="@dimen/status_bar_recents_app_icon_left_margin"
    -            android:layout_marginTop="@dimen/status_bar_recents_app_icon_top_margin"
    +            android:gravity="center_horizontal"
    +            android:layout_marginTop="405.0dip"
                 android:maxWidth="@dimen/status_bar_recents_app_icon_max_width"
                 android:maxHeight="@dimen/status_bar_recents_app_icon_max_height"
                 android:scaleType="centerInside"
                 android:adjustViewBounds="true"
             />
     
    +        <TextView android:id="@+id/app_label"
    +            android:layout_width="match_parent"
    +            android:layout_height="wrap_content"
    +            android:gravity="center_horizontal"
    +            android:textSize="@dimen/status_bar_recents_app_label_text_size"
    +            android:fadingEdge="none"
    +            android:fadingEdgeLength="0.0dip"
    +            android:scrollHorizontally="true"
    +            android:layout_below="@id/app_icon"
    +            android:layout_alignParentBottom="true"
    +            android:paddingTop="0.0dip"
    +            android:layout_marginTop="3.0dip"
    +            android:singleLine="true"
    +            android:ellipsize="marquee"
    +            android:textColor="@color/status_bar_recents_app_label_color"
    +        />
    +
             <TextView android:id="@+id/app_description"
                 android:layout_width="@dimen/status_bar_recents_app_label_width"
                 android:layout_height="wrap_content"
    @@ -90,10 +83,10 @@
                 android:fadingEdge="horizontal"
                 android:fadingEdgeLength="@dimen/status_bar_recents_fading_edge_length"
                 android:scrollHorizontally="true"
    -            android:layout_alignParentLeft="true"
    +            android:layout_alignParentBottom="true"
                 android:layout_marginLeft="@dimen/status_bar_recents_app_label_left_margin"
    -            android:layout_below="@id/recents_callout_line"
    -            android:layout_marginTop="3dip"
    +            android:layout_below="@id/app_label"
    +            android:layout_marginTop="40.0dip"
                 android:singleLine="true"
                 android:ellipsize="marquee"
             />
    diff -rupN ./a/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml ./b/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml
    --- ./a/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/layout-port/status_bar_recent_panel.xml	2012-04-27 14:11:39.881175000 +0900
    @@ -29,31 +29,49 @@
             android:background="@drawable/status_bar_recents_background"
             android:layout_width="match_parent"
             android:layout_height="match_parent"
    -        android:layout_alignParentBottom="true">
    +        android:layout_centerVertical="true">
     
    -        <com.android.systemui.recent.RecentsVerticalScrollView
    -            android:id="@+id/recents_container"
    -            android:layout_width="match_parent"
    -            android:layout_height="wrap_content"
    -            android:layout_marginRight="0dp"
    -            android:divider="@null"
    -            android:stackFromBottom="true"
    -            android:fadingEdge="vertical"
    -            android:scrollbars="none"
    -            android:fadingEdgeLength="@*android:dimen/status_bar_height"
    -            android:layout_gravity="bottom|left"
    -            android:clipToPadding="false"
    -            android:clipChildren="false">
    +        <ImageView
    +	    android:gravity="center"
    +	    android:layout_width="match_parent"
    +	    android:layout_height="match_parent"
    +	    android:layout_marginTop="0.0dip"
    +	    android:src="@drawable/status_bar_recents_background"
    +	/>
    +
    +        <com.android.systemui.recent.RecentsHorizontalScrollView
    +	    android:id="@+id/recents_container"
    +	    android:layout_gravity="bottom|left|center"
    +	    android:scrollbars="none"
    +	    android:fadingEdge="none"
    +	    android:fadingEdgeLength="0.0dip"
    +	    android:clipChildren="false"
    +	    android:clipToPadding="false"
    +    	    android:layout_width="match_parent"
    +	    android:layout_height="wrap_content"
    +	    android:layout_marginRight="0.0dip"
    +	    android:stackFromBottom="true"
    +	    android:divider="@null">
     
                 <LinearLayout android:id="@+id/recents_linear_layout"
                     android:layout_width="match_parent"
                     android:layout_height="wrap_content"
    -                android:orientation="vertical"
    +                android:orientation="horizontal"
                     android:clipToPadding="false"
                     android:clipChildren="false">
                 </LinearLayout>
     
    -        </com.android.systemui.recent.RecentsVerticalScrollView>
    +        </com.android.systemui.recent.RecentsHorizontalScrollView>
    +
    +	<TextView
    +	    android:textSize="20.0dip"
    +	    android:textColor="#ffe5e5e5"
    +	    android:gravity="center_horizontal"
    +	    android:layout_marginTop="45.0dip"
    +	    android:layout_width="match_parent"
    +	    android:layout_height="wrap_content"
    +	    android:text="@string/recent_apps_title"
    +	/>
     
         </FrameLayout>
     
    diff -rupN ./a/packages/SystemUI/res/values/colors.xml ./b/packages/SystemUI/res/values/colors.xml
    --- ./a/packages/SystemUI/res/values/colors.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/values/colors.xml	2012-04-26 19:46:08.367467000 +0900
    @@ -22,8 +22,8 @@
         <drawable name="notification_item_background_color_pressed">#ff257390</drawable>
         <drawable name="ticker_background_color">#ff1d1d1d</drawable>
         <drawable name="status_bar_background">#ff000000</drawable>
    -    <drawable name="status_bar_recents_background_solid">#b3000000</drawable>
    -    <drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable>
    +    <drawable name="status_bar_recents_background_solid">#00000000</drawable>
    +    <drawable name="status_bar_recents_app_thumbnail_background">#00000000</drawable>
         <color name="status_bar_recents_app_label_color">#ffffffff</color>
         <drawable name="status_bar_notification_row_background_color">#ff090909</drawable>
         <drawable name="notification_header_bg">#FF000000</drawable>
    diff -rupN ./a/packages/SystemUI/res/values/config.xml ./b/packages/SystemUI/res/values/config.xml
    --- ./a/packages/SystemUI/res/values/config.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/values/config.xml	2012-04-26 20:20:19.237457000 +0900
    @@ -27,7 +27,7 @@
     
         <!-- Whether recents thumbnails should stretch in both x and y to fill their
          ImageView -->
    -    <bool name="config_recents_thumbnail_image_fits_to_xy">false</bool>
    +    <bool name="config_recents_thumbnail_image_fits_to_xy">true</bool>
     
         <!-- Control whether status bar should distinguish HSPA data icon form UMTS
         data icon on devices -->
    diff -rupN ./a/packages/SystemUI/res/values/dimens.xml ./b/packages/SystemUI/res/values/dimens.xml
    --- ./a/packages/SystemUI/res/values/dimens.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/values/dimens.xml	2012-04-26 20:31:54.317462000 +0900
    @@ -21,9 +21,9 @@
     
         <!-- Recent Applications parameters -->
         <!-- Upper width limit for application icon -->
    -    <dimen name="status_bar_recents_app_icon_max_width">48dp</dimen>
    +    <dimen name="status_bar_recents_app_icon_max_width">42dp</dimen>
         <!-- Upper height limit for application icon -->
    -    <dimen name="status_bar_recents_app_icon_max_height">48dp</dimen>
    +    <dimen name="status_bar_recents_app_icon_max_height">42dp</dimen>
     
         <!-- Size of application thumbnail -->
         <dimen name="status_bar_recents_thumbnail_width">164dp</dimen>
    diff -rupN ./a/packages/SystemUI/res/values/strings.xml ./b/packages/SystemUI/res/values/strings.xml
    --- ./a/packages/SystemUI/res/values/strings.xml	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/res/values/strings.xml	2012-04-30 10:53:24.049658000 +0900
    @@ -377,4 +377,8 @@
     
         <!-- Content description of the clear button in the notification panel for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
         <string name="accessibility_clear_all">Clear all notifications.</string>
    +
    +    <!-- for Sense 4.0 style multitasking mod -->
    +    <string name="recent_apps_title">Recent apps</string>
    +
     </resources>
    diff -rupN ./a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java ./b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java
    --- ./a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java	2012-04-25 11:31:16.000000000 +0900
    +++ ./b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java	2012-05-07 04:30:21.215261000 +0900
    @@ -24,9 +24,17 @@ import android.content.Intent;
     import android.content.res.Configuration;
     import android.content.res.Resources;
     import android.graphics.Bitmap;
    +import android.graphics.drawable.BitmapDrawable;
     import android.graphics.Matrix;
     import android.graphics.Shader.TileMode;
    -import android.graphics.drawable.BitmapDrawable;
    +import android.graphics.Color;
    +import android.graphics.Canvas;
    +import android.graphics.LinearGradient;
    +import android.graphics.Paint;
    +import android.graphics.PorterDuffXfermode;
    +import android.graphics.Bitmap.Config;
    +import android.graphics.PorterDuff.Mode;
    +import android.graphics.Shader.TileMode;
     import android.net.Uri;
     import android.provider.Settings;
     import android.util.AttributeSet;
    @@ -402,7 +410,32 @@ public class RecentsPanelView extends Re
                 // Should remove the default image in the frame
                 // that this now covers, to improve scrolling speed.
                 // That can't be done until the anim is complete though.
    -            h.thumbnailViewImage.setImageBitmap(thumbnail);
    +            final int reflectionGap = 4;
    +            int width = thumbnail.getWidth();
    +            int height = thumbnail.getHeight();
    +	
    +            Matrix matrix = new Matrix();
    +            matrix.preScale(1, -1);
    +	
    +            Bitmap reflectionImage = Bitmap.createBitmap(thumbnail, 0, height * 2 / 3, width, height/3, matrix, false);	    
    +            Bitmap bitmapWithReflection = Bitmap.createBitmap(width, (height + height/3), Config.ARGB_8888);
    +	      
    +            Canvas canvas = new Canvas(bitmapWithReflection);
    +            canvas.drawBitmap(thumbnail, 0, 0, null);
    +            Paint defaultPaint = new Paint();
    +            canvas.drawRect(0, height, width, height + reflectionGap, defaultPaint);
    +            canvas.drawBitmap(reflectionImage, 0, height + reflectionGap, null);
    +	        
    +            Paint paint = new Paint(); 
    +            LinearGradient shader = new LinearGradient(0, thumbnail.getHeight(), 0, 
    +              bitmapWithReflection.getHeight() + reflectionGap, 0x70ffffff, 0x00ffffff, 
    +              TileMode.CLAMP); 
    +            paint.setShader(shader); 
    +            paint.setXfermode(new PorterDuffXfermode(Mode.DST_IN)); 
    +            canvas.drawRect(0, height, width, 
    +              bitmapWithReflection.getHeight() + reflectionGap, paint); 
    +
    +            h.thumbnailViewImage.setImageBitmap(bitmapWithReflection);
     
                 // scale the image to fill the full width of the ImageView. do this only if
                 // we haven't set a bitmap before, or if the bitmap size has changed
    @@ -410,7 +443,7 @@ public class RecentsPanelView extends Re
                     h.thumbnailViewImageBitmap.getWidth() != thumbnail.getWidth() ||
                     h.thumbnailViewImageBitmap.getHeight() != thumbnail.getHeight()) {
                     if (mFitThumbnailToXY) {
    -                    h.thumbnailViewImage.setScaleType(ScaleType.FIT_XY);
    +                    h.thumbnailViewImage.setRotationY(25.0f);
                     } else {
                         Matrix scaleMatrix = new Matrix();
                         float scale = mThumbnailWidth / (float) thumbnail.getWidth();

    -----------------------------------------------------------------------------

    Thanks to brucekey in rootzwiki
    (this mod is based on his WEBAOKP mod.)

    -----------------------------------------------------------------------------
    -----------------------------------------------------------------------------

    and Thanks to D4rKn3sSyS and Neil Davies
    for image reflection source code.


    -----------------------------------------------------------------------------
    6
    add on to this mod (smali direct edit)

    open this smali:
    systemui\smali\com\android\systemui\recent\Recents PanelView.smali

    search this line:
    .method private updateThumbnail(Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;Landroid/graphics/Bitmap;ZZ)V

    locate the end of the .methode a few lines after:
    .end method

    replace the selection under ".method private xxxxxxxxxxxxxx" and ".end method" Replace the entire code selected with this one!

    Code:
    .method private updateThumbnail(Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;Landroid/graphics/Bitmap;ZZ)V
        .locals 30
        .parameter "h"
        .parameter "thumbnail"
        .parameter "show"
        .parameter "anim"
    
        .prologue
        .line 409
        if-eqz p2, :cond_4
    
        .line 413
        const/16 v26, 0x4
    
        .line 414
        .local v26, reflectionGap:I
        invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I
    
        move-result v6
    
        .line 415
        .local v6, width:I
        invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I
    
        move-result v24
    
        .line 417
        .local v24, height:I
        new-instance v8, Landroid/graphics/Matrix;
    
        invoke-direct {v8}, Landroid/graphics/Matrix;-><init>()V
    
        .line 418
        .local v8, matrix:Landroid/graphics/Matrix;
        const/high16 v3, 0x3f80
    
        const/high16 v4, -0x4080
    
        invoke-virtual {v8, v3, v4}, Landroid/graphics/Matrix;->preScale(FF)Z
    
        .line 420
        const/4 v4, 0x0
    
        mul-int/lit8 v3, v24, 0x2
    
        div-int/lit8 v5, v3, 0x3
    
        div-int/lit8 v7, v24, 0x3
    
        const/4 v9, 0x0
    
        move-object/from16 v3, p2
    
        invoke-static/range {v3 .. v9}, Landroid/graphics/Bitmap;->createBitmap(Landroid/graphics/Bitmap;IIIILandroid/graphics/Matrix;Z)Landroid/graphics/Bitmap;
    
        move-result-object v27
    
        .line 421
        .local v27, reflectionImage:Landroid/graphics/Bitmap;
        div-int/lit8 v3, v24, 0x3
    
        add-int v3, v3, v24
    
        sget-object v4, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;
    
        invoke-static {v6, v3, v4}, Landroid/graphics/Bitmap;->createBitmap(IILandroid/graphics/Bitmap$Config;)Landroid/graphics/Bitmap;
    
        move-result-object v23
    
        .line 423
        .local v23, bitmapWithReflection:Landroid/graphics/Bitmap;
        new-instance v9, Landroid/graphics/Canvas;
    
        move-object/from16 v0, v23
    
        invoke-direct {v9, v0}, Landroid/graphics/Canvas;-><init>(Landroid/graphics/Bitmap;)V
    
        .line 424
        .local v9, canvas:Landroid/graphics/Canvas;
        const/4 v3, 0x0
    
        const/4 v4, 0x0
    
        const/4 v5, 0x0
    
        move-object/from16 v0, p2
    
        invoke-virtual {v9, v0, v3, v4, v5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
    
        .line 425
        new-instance v14, Landroid/graphics/Paint;
    
        invoke-direct {v14}, Landroid/graphics/Paint;-><init>()V
    
        .line 426
        .local v14, defaultPaint:Landroid/graphics/Paint;
        const/4 v10, 0x0
    
        move/from16 v0, v24
    
        int-to-float v11, v0
    
        int-to-float v12, v6
    
        add-int/lit8 v3, v24, 0x4
    
        int-to-float v13, v3
    
        invoke-virtual/range {v9 .. v14}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
    
        .line 427
        const/4 v3, 0x0
    
        add-int/lit8 v4, v24, 0x4
    
        int-to-float v4, v4
    
        const/4 v5, 0x0
    
        move-object/from16 v0, v27
    
        invoke-virtual {v9, v0, v3, v4, v5}, Landroid/graphics/Canvas;->drawBitmap(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V
    
        .line 429
        new-instance v25, Landroid/graphics/Paint;
    
        invoke-direct/range {v25 .. v25}, Landroid/graphics/Paint;-><init>()V
    
        .line 430
        .local v25, paint:Landroid/graphics/Paint;
        new-instance v15, Landroid/graphics/LinearGradient;
    
        const/16 v16, 0x0
    
        invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I
    
        move-result v3
    
        int-to-float v0, v3
    
        move/from16 v17, v0
    
        const/16 v18, 0x0
    
        invoke-virtual/range {v23 .. v23}, Landroid/graphics/Bitmap;->getHeight()I
    
        move-result v3
    
        add-int/lit8 v3, v3, 0x4
    
        int-to-float v0, v3
    
        move/from16 v19, v0
    
        const v20, 0x70ffffff
    
        const v21, 0xffffff
    
        sget-object v22, Landroid/graphics/Shader$TileMode;->CLAMP:Landroid/graphics/Shader$TileMode;
    
        invoke-direct/range {v15 .. v22}, Landroid/graphics/LinearGradient;-><init>(FFFFIILandroid/graphics/Shader$TileMode;)V
    
        .line 433
        .local v15, shader:Landroid/graphics/LinearGradient;
        move-object/from16 v0, v25
    
        invoke-virtual {v0, v15}, Landroid/graphics/Paint;->setShader(Landroid/graphics/Shader;)Landroid/graphics/Shader;
    
        .line 434
        new-instance v3, Landroid/graphics/PorterDuffXfermode;
    
        sget-object v4, Landroid/graphics/PorterDuff$Mode;->DST_IN:Landroid/graphics/PorterDuff$Mode;
    
        invoke-direct {v3, v4}, Landroid/graphics/PorterDuffXfermode;-><init>(Landroid/graphics/PorterDuff$Mode;)V
    
        move-object/from16 v0, v25
    
        invoke-virtual {v0, v3}, Landroid/graphics/Paint;->setXfermode(Landroid/graphics/Xfermode;)Landroid/graphics/Xfermode;
    
        .line 435
        const/16 v17, 0x0
    
        move/from16 v0, v24
    
        int-to-float v0, v0
    
        move/from16 v18, v0
    
        int-to-float v0, v6
    
        move/from16 v19, v0
    
        invoke-virtual/range {v23 .. v23}, Landroid/graphics/Bitmap;->getHeight()I
    
        move-result v3
    
        add-int/lit8 v3, v3, 0x4
    
        int-to-float v0, v3
    
        move/from16 v20, v0
    
        move-object/from16 v16, v9
    
        move-object/from16 v21, v25
    
        invoke-virtual/range {v16 .. v21}, Landroid/graphics/Canvas;->drawRect(FFFFLandroid/graphics/Paint;)V
    
        .line 438
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
    
        move-object/from16 v0, v23
    
        invoke-virtual {v3, v0}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V
    
        .line 442
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImageBitmap:Landroid/graphics/Bitmap;
    
        if-eqz v3, :cond_0
    
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImageBitmap:Landroid/graphics/Bitmap;
    
        invoke-virtual {v3}, Landroid/graphics/Bitmap;->getWidth()I
    
        move-result v3
    
        invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I
    
        move-result v4
    
        if-ne v3, v4, :cond_0
    
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImageBitmap:Landroid/graphics/Bitmap;
    
        invoke-virtual {v3}, Landroid/graphics/Bitmap;->getHeight()I
    
        move-result v3
    
        invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getHeight()I
    
        move-result v4
    
        if-eq v3, v4, :cond_1
    
        .line 445
        :cond_0
        move-object/from16 v0, p0
    
        iget-boolean v3, v0, Lcom/android/systemui/recent/RecentsPanelView;->mFitThumbnailToXY:Z
    
        if-eqz v3, :cond_5
    
        .line 446
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
    
        const/high16 v4, 0x41c8
    
        invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setRotationY(F)V
    
        .line 455
        :cond_1
        :goto_0
        if-eqz p3, :cond_3
    
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailView:Landroid/view/View;
    
        invoke-virtual {v3}, Landroid/view/View;->getVisibility()I
    
        move-result v3
    
        if-eqz v3, :cond_3
    
        .line 456
        if-eqz p4, :cond_2
    
        .line 457
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailView:Landroid/view/View;
    
        move-object/from16 v0, p0
    
        iget-object v4, v0, Lcom/android/systemui/recent/RecentsPanelView;->mContext:Landroid/content/Context;
    
        const v5, 0x7f04000f
    
        invoke-static {v4, v5}, Landroid/view/animation/AnimationUtils;->loadAnimation(Landroid/content/Context;I)Landroid/view/animation/Animation;
    
        move-result-object v4
    
        invoke-virtual {v3, v4}, Landroid/view/View;->setAnimation(Landroid/view/animation/Animation;)V
    
        .line 460
        :cond_2
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailView:Landroid/view/View;
    
        const/4 v4, 0x0
    
        invoke-virtual {v3, v4}, Landroid/view/View;->setVisibility(I)V
    
        .line 462
        :cond_3
        move-object/from16 v0, p2
    
        move-object/from16 v1, p1
    
        iput-object v0, v1, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImageBitmap:Landroid/graphics/Bitmap;
    
        .line 464
        .end local v6           #width:I
        .end local v8           #matrix:Landroid/graphics/Matrix;
        .end local v9           #canvas:Landroid/graphics/Canvas;
        .end local v14           #defaultPaint:Landroid/graphics/Paint;
        .end local v15           #shader:Landroid/graphics/LinearGradient;
        .end local v23           #bitmapWithReflection:Landroid/graphics/Bitmap;
        .end local v24           #height:I
        .end local v25           #paint:Landroid/graphics/Paint;
        .end local v26           #reflectionGap:I
        .end local v27           #reflectionImage:Landroid/graphics/Bitmap;
        :cond_4
        return-void
    
        .line 448
        .restart local v6       #width:I
        .restart local v8       #matrix:Landroid/graphics/Matrix;
        .restart local v9       #canvas:Landroid/graphics/Canvas;
        .restart local v14       #defaultPaint:Landroid/graphics/Paint;
        .restart local v15       #shader:Landroid/graphics/LinearGradient;
        .restart local v23       #bitmapWithReflection:Landroid/graphics/Bitmap;
        .restart local v24       #height:I
        .restart local v25       #paint:Landroid/graphics/Paint;
        .restart local v26       #reflectionGap:I
        .restart local v27       #reflectionImage:Landroid/graphics/Bitmap;
        :cond_5
        new-instance v29, Landroid/graphics/Matrix;
    
        invoke-direct/range {v29 .. v29}, Landroid/graphics/Matrix;-><init>()V
    
        .line 449
        .local v29, scaleMatrix:Landroid/graphics/Matrix;
        move-object/from16 v0, p0
    
        iget v3, v0, Lcom/android/systemui/recent/RecentsPanelView;->mThumbnailWidth:I
    
        int-to-float v3, v3
    
        invoke-virtual/range {p2 .. p2}, Landroid/graphics/Bitmap;->getWidth()I
    
        move-result v4
    
        int-to-float v4, v4
    
        div-float v28, v3, v4
    
        .line 450
        .local v28, scale:F
        move-object/from16 v0, v29
    
        move/from16 v1, v28
    
        move/from16 v2, v28
    
        invoke-virtual {v0, v1, v2}, Landroid/graphics/Matrix;->setScale(FF)V
    
        .line 451
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
    
        sget-object v4, Landroid/widget/ImageView$ScaleType;->MATRIX:Landroid/widget/ImageView$ScaleType;
    
        invoke-virtual {v3, v4}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V
    
        .line 452
        move-object/from16 v0, p1
    
        iget-object v3, v0, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
    
        move-object/from16 v0, v29
    
        invoke-virtual {v3, v0}, Landroid/widget/ImageView;->setImageMatrix(Landroid/graphics/Matrix;)V
    
        goto :goto_0
    .end method

    recompil and voila ;)
    5
    Aaand here's a last landscape try from me:
    shot000004i.png


    XMLs:
    http://www.mediafire.com/download.php?88c7hvqm1ascs77
    4
    Is it possible to post smali for code. i would like to put this in MIUI but unfortunately source is not available.

    Here (added 2 lines, those surrounded by "###")

    SystemUI\com\android\systemui\recent\RecentsPanelView.smali

    Code:
        .line 433
        iget-object v2, p1, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
    
        sget-object v3, Landroid/widget/ImageView$ScaleType;->MATRIX:Landroid/widget/ImageView$ScaleType;
    
        invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V
    
        .line 434
        iget-object v2, p1, Lcom/android/systemui/recent/RecentsPanelView$ViewHolder;->thumbnailViewImage:Landroid/widget/ImageView;
    
        invoke-virtual {v2, v1}, Landroid/widget/ImageView;->setImageMatrix(Landroid/graphics/Matrix;)V
    	
    	###
    	const/high16 v3, 0x41a0
    
            invoke-virtual {v2, v3}, Landroid/widget/ImageView;->setRotationY(F)V
    	###
        goto :goto_2e
    .end method
    4
    evilisto, why didn't you fix landscape?
    I mean, you did all the hard work and you couldn't fix landscape? :p

    Here's a little try by me (not perfect, but I guess it's better than nothing):
    shot000003u.png


    And here are my landscape XMLs (I've also attached my portrait XMLs, so you can compare):
    http://www.mediafire.com/download.php?1wf7w7jwb4wh59f
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone