5,815,022 Members 39,471 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
evilisto
Old
(Last edited by evilisto; 3rd December 2012 at 10:51 PM.) Reason: update for JOP40D
#1  
evilisto's Avatar
Senior Member - OP
Thanks Meter 2,345
Posts: 486
Join Date: Nov 2010
Default [MOD][DEV] Motorola style Transparent NavBar [JOP40D]

-----------------------------------------------------------------------------
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

-----------------------------------------------------------------------------
| Google+ |
The Following 27 Users Say Thank You to evilisto For This Useful Post: [ Click to Expand ]
 
Youngunn2008
Old
#2  
Youngunn2008's Avatar
Senior Member
Thanks Meter 1,548
Posts: 3,288
Join Date: Aug 2010
Location: Alton, IL
I'm a fan of moto's new interface. Good job bro.

phone: Moto X
rom: stock KitKat, rooted

tablet: Barnes & Noble Nook HD+
rom: CyanogenMod 11 Nightlies
recovery: CWM 6
kernel: CM stock

My Android Build PC
_________________________________
 
vicino
Old
#3  
vicino's Avatar
Recognized Themer
Thanks Meter 6,143
Posts: 2,443
Join Date: Jun 2007
welcome back man! i'ts been awhile

transparent Navbar! nice

i think this would be great with my Moto theme lol
 
tibi09
Old
#4  
Junior Member
Thanks Meter 0
Posts: 22
Join Date: Aug 2012
Galaxy Nexus AOSP JRO03C ok
Galaxy Nexus, Android 4.1.1
N7100. [4.4.2] DN3 V5
N7100. PhoeniX ROM 18.5
 
tibi09
Old
#5  
Junior Member
Thanks Meter 0
Posts: 22
Join Date: Aug 2012
Only on the desktop is transparent to other interface or black
Not compatible cm, aokp?, Will stop at the boot screen
Galaxy Nexus, Android 4.1.1
N7100. [4.4.2] DN3 V5
N7100. PhoeniX ROM 18.5
 
gl189547
Old
#6  
Junior Member
Thanks Meter 0
Posts: 3
Join Date: Jun 2010
you did a great job!
 
Sean_Seany
Old
#7  
Senior Member
Thanks Meter 125
Posts: 388
Join Date: Jul 2012
Location: zqǝʍɹǝʇuI
Im sorry for the stupid question but what do i do with this please ?.......yes im a noob
 
evilisto
Old
#8  
evilisto's Avatar
Senior Member - OP
Thanks Meter 2,345
Posts: 486
Join Date: Nov 2010
Quote:
Originally Posted by tibi09 View Post
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 View Post
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).
| Google+ |
 
aooga
Old
#9  
aooga's Avatar
Senior Member
Thanks Meter 869
Posts: 2,982
Join Date: Feb 2011
Location: California
is this possible on windows?
 
sert00
Old
#10  
sert00's Avatar
Senior Member
Thanks Meter 505
Posts: 1,082
Join Date: May 2011
Location: cesena,IT
Quote:
Originally Posted by aooga View Post
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!
My current mobile devices:
Samsung galaxy nexus maguro version 16Gb
Asus transformer WiFi-only 16Gb
Asus nexus 7 WiFi-only 16Gb
My current system embedded boards in use:
Arduino UNO (x2)
Arduino Mega 2560 (ADK support with USBHost Shield)
My current ARM boards:
Raspberry Pi rev.B
Hardkernel odroid-U2 with Exynos4412 PRIME x2 and all optional addons
Hardkernel odroid-XU-E with Exynos5410 x1 and all optional addons

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

Advanced Search
Display Modes