Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[MOD][DEV] Motorola style Transparent NavBar [JOP40D]

OP evilisto

12th September 2012, 02:50 AM   |  #1  
evilisto's Avatar
OP Senior Member
Thanks Meter: 2,349
 
486 posts
Join Date:Joined: Nov 2010
-----------------------------------------------------------------------------
Updated to v1.1
- add Tablet UI support : Preview
- very minor fixes
-----------------------------------------------------------------------------

This mod is originally posted in Galaxy Nexus theme forum :
[MOD] Moto Style - Transparent Navbar and Modified Launcher



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

* diff for JOP40D : download

Code:
diff -rupN ./a/frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml ./b/frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml
--- ./a/frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml	2012-11-15 06:56:46.284574000 +0900
+++ ./b/frameworks/base/packages/SystemUI/res/layout/navigation_bar.xml	2012-11-26 02:22:33.688340970 +0900
@@ -23,7 +23,7 @@
     xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
     android:layout_height="match_parent"
     android:layout_width="match_parent"
-    android:background="#FF000000"
+    android:background="#88000000"
     >
 
     <FrameLayout android:id="@+id/rot0"
diff -rupN ./a/frameworks/base/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml ./b/frameworks/base/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml
--- ./a/frameworks/base/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml	2012-11-15 06:56:51.254573000 +0900
+++ ./b/frameworks/base/packages/SystemUI/res/layout-sw600dp/navigation_bar.xml	2012-11-26 02:22:45.329174028 +0900
@@ -22,7 +22,7 @@
     xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui"
     android:layout_height="match_parent"
     android:layout_width="match_parent"
-    android:background="#FF000000"
+    android:background="#88000000"
     >
 
     <FrameLayout android:id="@+id/rot0"
diff -rupN ./a/frameworks/base/packages/SystemUI/res/values/colors.xml ./b/frameworks/base/packages/SystemUI/res/values/colors.xml
--- ./a/frameworks/base/packages/SystemUI/res/values/colors.xml	2012-11-15 06:56:15.354577000 +0900
+++ ./b/frameworks/base/packages/SystemUI/res/values/colors.xml	2012-11-26 02:23:37.219186755 +0900
@@ -19,7 +19,7 @@
 <resources>
     <drawable name="notification_number_text_color">#ffffffff</drawable>
     <drawable name="ticker_background_color">#ff1d1d1d</drawable>
-    <drawable name="status_bar_background">#ff000000</drawable>
+    <drawable name="status_bar_background">#88000000</drawable>
     <color name="notification_panel_solid_background">#ff000000</color>
     <drawable name="status_bar_recents_app_thumbnail_background">#88000000</drawable>
     <color name="status_bar_recents_app_label_color">#ffffffff</color>
@@ -31,8 +31,8 @@
     <drawable name="notification_header_bg">#FF000000</drawable>
 
     <!-- ==================== system bar only ==================== -->
-    <drawable name="system_bar_background">#ff000000</drawable>
+    <drawable name="system_bar_background">#88000000</drawable>
     <!-- the darkening filter applied to notifications -->
-    <drawable name="notification_icon_area_smoke">#aa000000</drawable>
+    <drawable name="notification_icon_area_smoke">#88000000</drawable>
     <color name="notification_panel_scrim_color">#B0000000</color>
 </resources>
diff -rupN ./a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java ./b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
--- ./a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java	2012-11-15 06:56:11.314567000 +0900
+++ ./b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java	2012-12-04 03:48:39.654073231 +0900
@@ -410,7 +410,7 @@ public class PhoneStatusBar extends Base
         }
 
         // figure out which pixel-format to use for the status bar.
-        mPixelFormat = PixelFormat.OPAQUE;
+        mPixelFormat = PixelFormat.TRANSLUCENT;
 
         mSystemIconArea = (LinearLayout) mStatusBarView.findViewById(R.id.system_icon_area);
         mStatusIcons = (LinearLayout)mStatusBarView.findViewById(R.id.statusIcons);
@@ -800,7 +800,7 @@ public class PhoneStatusBar extends Base
                     | WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL
                     | WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH
                     | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
-                PixelFormat.OPAQUE);
+                PixelFormat.TRANSLUCENT);
         // this will allow the navbar to run in an overlay on devices that support this
         if (ActivityManager.isHighEndGfx()) {
             lp.flags |= WindowManager.LayoutParams.FLAG_HARDWARE_ACCELERATED;
diff -rupN ./a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java ./b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java
--- ./a/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java	2012-11-15 06:56:20.634573000 +0900
+++ ./b/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java	2012-12-04 03:49:10.074070472 +0900
@@ -223,7 +223,7 @@ public class TabletStatusBar extends Bas
                 WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE
                     | WindowManager.LayoutParams.FLAG_TOUCHABLE_WHEN_WAKING
                     | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH,
-                PixelFormat.OPAQUE);
+                PixelFormat.TRANSLUCENT);
 
         // We explicitly leave FLAG_HARDWARE_ACCELERATED out of the flags.  The status bar occupies
         // very little screen real-estate and is updated fairly frequently.  By using CPU rendering
diff -rupN ./a/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java ./b/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
--- ./a/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java	2012-11-15 06:56:30.065396000 +0900
+++ ./b/frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java	2012-11-26 02:17:11.528336640 +0900
@@ -2547,8 +2547,6 @@ public class PhoneWindowManager implemen
         systemRect.top = mSystemTop;
         systemRect.right = mSystemRight;
         systemRect.bottom = mSystemBottom;
-        if (mStatusBar != null) return mStatusBar.getSurfaceLayer();
-        if (mNavigationBar != null) return mNavigationBar.getSurfaceLayer();
         return 0;
     }
 
diff -rupN ./a/packages/apps/Launcher2/res/layout-port/launcher.xml ./b/packages/apps/Launcher2/res/layout-port/launcher.xml
--- ./a/packages/apps/Launcher2/res/layout-port/launcher.xml	2012-11-15 06:56:33.644567000 +0900
+++ ./b/packages/apps/Launcher2/res/layout-port/launcher.xml	2012-11-26 02:13:44.479173944 +0900
@@ -19,7 +19,7 @@
     xmlns:launcher="http://schemas.android.com/apk/res/com.android.launcher"
 
     android:id="@+id/drag_layer"
-    android:background="@drawable/workspace_bg"
+    android:background="#00000000"
     android:layout_width="match_parent"
     android:layout_height="match_parent">
 
diff -rupN ./a/packages/apps/Launcher2/res/values/dimens.xml ./b/packages/apps/Launcher2/res/values/dimens.xml
--- ./a/packages/apps/Launcher2/res/values/dimens.xml	2012-11-15 06:56:36.904569000 +0900
+++ ./b/packages/apps/Launcher2/res/values/dimens.xml	2012-11-26 02:14:58.399175719 +0900
@@ -43,8 +43,8 @@
     <dimen name="workspace_divider_padding_right">3dp</dimen>
     <dimen name="workspace_divider_padding_top">0dp</dimen>
     <dimen name="workspace_divider_padding_bottom">0dp</dimen>
-    <dimen name="hotseat_cell_width">64dp</dimen>
-    <dimen name="hotseat_cell_height">64dp</dimen>
+    <dimen name="hotseat_cell_width">72dp</dimen>
+    <dimen name="hotseat_cell_height">88dp</dimen>
     <dimen name="hotseat_width_gap">-1dp</dimen>
     <dimen name="hotseat_height_gap">-1dp</dimen>
     <dimen name="workspace_overscroll_drawable_padding">0dp</dimen>
diff -rupN ./a/packages/apps/Launcher2/src/com/android/launcher2/CellLayout.java ./b/packages/apps/Launcher2/src/com/android/launcher2/CellLayout.java
--- ./a/packages/apps/Launcher2/src/com/android/launcher2/CellLayout.java	2012-11-26 02:13:14.109170000 +0900
+++ ./b/packages/apps/Launcher2/src/com/android/launcher2/CellLayout.java	2012-11-26 00:46:51.878340000 +0900
@@ -609,11 +609,7 @@ public class CellLayout extends ViewGrou
             BubbleTextView bubbleChild = (BubbleTextView) child;
 
             Resources res = getResources();
-            if (mIsHotseat) {
-                bubbleChild.setTextColor(res.getColor(android.R.color.transparent));
-            } else {
-                bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
-            }
+            bubbleChild.setTextColor(res.getColor(R.color.workspace_icon_text_color));
         }
 
         child.setScaleX(getChildrenScale());
diff -rupN ./a/packages/apps/Launcher2/src/com/android/launcher2/Workspace.java ./b/packages/apps/Launcher2/src/com/android/launcher2/Workspace.java
--- ./a/packages/apps/Launcher2/src/com/android/launcher2/Workspace.java	2012-11-26 02:13:06.868336000 +0900
+++ ./b/packages/apps/Launcher2/src/com/android/launcher2/Workspace.java	2012-11-26 00:50:40.238351000 +0900
@@ -43,6 +43,7 @@ import android.os.Build;
 import android.os.IBinder;
 import android.os.Parcelable;
 import android.util.AttributeSet;
+import android.util.DisplayMetrics;
 import android.util.Log;
 import android.util.SparseArray;
 import android.view.Display;
@@ -522,7 +523,7 @@ public class Workspace extends SmoothPag
 
             // Hide folder title in the hotseat
             if (child instanceof FolderIcon) {
-                ((FolderIcon) child).setTextVisible(false);
+                ((FolderIcon) child).setTextVisible(true);
             }
 
             if (screen < 0) {
@@ -837,12 +838,10 @@ public class Workspace extends SmoothPag
     }
 
     protected void setWallpaperDimension() {
-        Point minDims = new Point();
-        Point maxDims = new Point();
-        mLauncher.getWindowManager().getDefaultDisplay().getCurrentSizeRange(minDims, maxDims);
-
-        final int maxDim = Math.max(maxDims.x, maxDims.y);
-        final int minDim = Math.min(minDims.x, minDims.y);
+        DisplayMetrics displayMetrics = new DisplayMetrics();
+        mLauncher.getWindowManager().getDefaultDisplay().getRealMetrics(displayMetrics);
+        final int maxDim = Math.max(displayMetrics.widthPixels, displayMetrics.heightPixels);
+        final int minDim = Math.min(displayMetrics.widthPixels, displayMetrics.heightPixels);
 
         // We need to ensure that there is enough extra space in the wallpaper for the intended
         // parallax effects
@@ -971,9 +970,9 @@ public class Workspace extends SmoothPag
 
     class WallpaperOffsetInterpolator {
         float mFinalHorizontalWallpaperOffset = 0.0f;
-        float mFinalVerticalWallpaperOffset = 0.5f;
+        float mFinalVerticalWallpaperOffset = 0.0f;
         float mHorizontalWallpaperOffset = 0.0f;
-        float mVerticalWallpaperOffset = 0.5f;
+        float mVerticalWallpaperOffset = 0.0f;
         long mLastWallpaperOffsetUpdateTime;
         boolean mIsMovingFast;
         boolean mOverrideHorizontalCatchupConstant;
* resources : download

-----------------------------------------------------------------------------
Last edited by evilisto; 3rd December 2012 at 11:51 PM. Reason: update for JOP40D
The Following 27 Users Say Thank You to evilisto For This Useful Post: [ View ]
12th September 2012, 03:30 AM   |  #2  
Youngunn2008's Avatar
Senior Member
Flag Alton, IL
Thanks Meter: 1,548
 
3,287 posts
Join Date:Joined: Aug 2010
More
I'm a fan of moto's new interface. Good job bro.
12th September 2012, 04:07 AM   |  #3  
vicino's Avatar
Recognized Themer
Thanks Meter: 6,146
 
10
2,444 posts
Join Date:Joined: Jun 2007
More
welcome back man! i'ts been awhile

transparent Navbar! nice

i think this would be great with my Moto theme lol
13th September 2012, 05:42 AM   |  #4  
Junior Member
Thanks Meter: 0
 
22 posts
Join Date:Joined: Aug 2012
Galaxy Nexus AOSP JRO03C ok
13th September 2012, 09:20 AM   |  #5  
Junior Member
Thanks Meter: 0
 
22 posts
Join Date:Joined: Aug 2012
Only on the desktop is transparent to other interface or black
Not compatible cm, aokp?, Will stop at the boot screen
13th September 2012, 03:23 PM   |  #6  
Junior Member
Thanks Meter: 0
 
3 posts
Join Date:Joined: Jun 2010
you did a great job!
14th September 2012, 12:53 AM   |  #7  
Senior Member
Flag zqǝʍɹǝʇuI
Thanks Meter: 125
 
388 posts
Join Date:Joined: Jul 2012
More
Im sorry for the stupid question but what do i do with this please ?.......yes im a noob
14th September 2012, 06:06 PM   |  #8  
evilisto's Avatar
OP Senior Member
Thanks Meter: 2,349
 
486 posts
Join Date:Joined: Nov 2010
Quote:
Originally Posted by tibi09

Only on the desktop is transparent to other interface or black
Not compatible cm, aokp?, Will stop at the boot screen

Yes, this mod makes navbar and statusbar to semi-transparent on stock launcher's workspace(home screen) only.
If navbar is transparent when using other apps, that will cause many ui problems.. (navbar will overlap some ui elements)

And this patch is for AOSP only, because I'm using stock rom..
But I think making same mod for cm9 or aokp is not much different from this. (but you have to apply patch manually)


Quote:
Originally Posted by Sean_Seany

Im sorry for the stupid question but what do i do with this please ?.......yes im a noob

This patch is for someone who know how to compile android on linux. (not difficult at all because there are so many great guides about it )
Apply this patch and compile rom or each files(SystemUI.apk, android.policy.jar and Launcher2.apk). then you can get this mod for your device (or rom).
15th September 2012, 04:55 AM   |  #9  
aooga's Avatar
Senior Member
Flag California
Thanks Meter: 931
 
3,139 posts
Join Date:Joined: Feb 2011
More
is this possible on windows?
15th September 2012, 06:37 AM   |  #10  
sert00's Avatar
Senior Member
Flag cesena,IT
Thanks Meter: 505
 
1,082 posts
Join Date:Joined: May 2011
More
Quote:
Originally Posted by aooga

is this possible on windows?

i think yes,but very elaborated without all the change...OP sad the modify at framework,but not these on policy.jar and systemUI..instaed with the inux method,with diff and patch tools you can easily do the mod.i'm linux user from 2 months,but i'm not able to do that.i'm trying right now,i want to do that on codename for gnex,i'll let you say if i have good response on this work!

Post Reply Subscribe to Thread

Tags
motorola razr atrix transparent navbar
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes