Jump to content


[How-To] Hide Statusbar on CM10/10.1 and still expand it


  • Please log in to reply
No replies to this topic

#1 Guest_BDH_*

Guest_BDH_*
  • Guests

Posted 18 May 2013 - 10:36 PM

invisible_notification_bar_mod-300x500.j

 

The purpose of this guide is to show you how to hide the status bar and still be able to swipe it down.

 

I've tested this guide on CYANOGENMOD10.1 with my Droid RAZR and everything works perfectly.

 

It will work on any cm10 and cm10.1 rom

 

I don't know if this method will work on other custom roms like aokp (probably) or on samsung, htc roms (probably with some differences)


Let's Begin!

 

We will be using apktool, if you don't know how to use it, check HERE.
If you are having problems with apktool on ubuntu, THIS might help you.

How does it work?

The status bar will still be there, it will be fully transparent and a bit smaller.

It might look difficult, but you will only have to modify a few lines of code
----------------------------------------------------STEPS----------------------------------------------------

 

  • download your rom and extract SystemUI.apk and framework-res.apk
  • open the terminal/cmd (you will NEVER close it during the procedure) in the folder where you unpacked systemui and framework-res and type
    apktool if framework-res.apk
    apktool d framework-res.apk
    this will create a framework-res folder.
  •  
  • open framework-res/res/values/dimens.xml and replace the line
    <dimen name="status_bar_height">25.0dip</dimen>
    with
    <dimen name="status_bar_height">6.0dip</dimen>
    you can choose a value between 1dip and 10dip (i suggest 2 to 5 dip). I personally use 2dip.

 

  • EDIT: if you want also a 0dip navbar modify the 3 lines below this one
    save the file and close it

 

  • type in the terminal/cmd
     
    Code:
    apktool d SystemUI.apk
    this will create a SystemUI folder

 

  • open SystemUI/res/values/drawables.xml and replace the line
    <item type="drawable" name="status_bar_background">#ff000000</item>
    with
    <item type="drawable" name="status_bar_background">#00000000</item>
    save and close

 

  • open SystemUI/res/layout/super_status_bar.xml and replace
    <com.android.systemui.statusbar.phone.StatusBarWindowView android:background="@*android:color/transparent" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
    with
  •  
    Code:
    <com.android.systemui.statusbar.phone.StatusBarWindowView android:background="#00000000" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
    save and close

 

  • open SystemUI/res/layout/status_bar.xml and replace
    <LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
    with
    <LinearLayout android:orientation="horizontal" android:id="@id/status_bar_contents" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="0.0dip" android:layout_height="0.0dip">
    then
    <ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
    with
    <ImageSwitcher android:id="@id/tickerIcon" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_marginRight="4.0dip">
    and then
    <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
    with
    <com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0">
    save and close

 

  • now open SystemUI/smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
    and search for
    invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
    you will have 3 matches, the correct line should be right after
    const/16 v3, 0x7d0
    
    const v4, 0x800048
    
    const/4 v5, -0x3
    you have to replace
    const/16 v3, 0x7d0
    with
    const/16 v3, 0x7d1
    (with this change the status bar will not have anymore the reserved top space)

 

          save and close

  • now you can recompile framework-res and systemui typing in the terminal/cmd
    apktool b framework-res framework-res.apk
    apktool b SystemUI SystemUI.apk
  • make a flashable zip with this 2 files

 

 

-----------------------------------------------DONE-----------------------------------------------

 

To revert back just flash the stock systemui and framework-res of your rom

You will have only one "bug", you will not to able to expand the status bar in the lockscreen.

 

If someone figures out how to fix this, please post it here.

I use this mod along with notifier pro, a very useful app.

If you are on a tablet, the procedure is the same, you have just to replace every "phone" with "tablet" (or you will modify the wrong files).

 

Thanks to Enrico Albano for the video:


  • johnthehillbilly likes this




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users