FORUMS

Focus – An Attractive But Raw Gallery Replacement

Focus is an attractive new app built by XDA members Liam Spradlin … more

How to Root the LG G4 and Install TWRP Recovery – XDA TV

A rooting method has finally been found for the flagship LG G4. In this … more

New Xposed for Lollipop 5.0 Update Fixes Major Bugs

Senior Recognized Developer rovo89 has patched Xposed for Lollipop 5.0 to … more

Download Sony’s new AOSP-like concept for Xperia Z3

Over in our forums, Recognized Contributor Jozinek has posted a very … more

[MOD] 4.4.2 TW Hidden power button

2,184 posts
Thanks Meter: 6,830
 
By tkari4, Senior Member on 27th March 2014, 11:33 AM
Post Reply Subscribe to Thread Email Thread
Hidden power button under the status bar clock.

No visual changes looks like the stock status bar:


Attention!

After this changes an Xposed modul can't move, or hide the clock.


Functions:
- Short press on the clock turns off the screen
- Long press, or swipe from the clock top to the bottom opens the power menu.

Needed tools:
Apktool
Notepad++

1. Decompile SystemUI.apk
2. Navigate to \res\layout folder
3. Open status_bar.xml

Add BLUE lines.

Code:
        <LinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
            <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
                <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
                <TextView android:textSize="@dimen/status_bar_battery_text_size" android:textColor="#ffffffff" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" android:layout_marginStart="@dimen/status_bar_battery_text_marginStart" />
                <com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="12.0dip" android:layout_height="18.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="5.0dip" />
            </LinearLayout>
             <FrameLayout android:gravity="center" android:orientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_centerInParent="true">
              <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:ellipsize="none" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" android:paddingStart="6.0dip" systemui:ampmSmall="false" />
              <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@null" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" />
             </FrameLayout>
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip">
4. Save your changes
5. Build SystemUI.apk
6. Push to your Phone, set permissions, reboot

I did it already for the N9005XXUENC2 firmware: Download

The Following 16 Users Say Thank You to tkari4 For This Useful Post: [ View ]
 
 
27th March 2014, 02:58 PM |#2  
AldrichDSaints's Avatar
Senior Member
Flag Binan City
Thanks Meter: 26
 
More
Quote:
Originally Posted by tkari4

Hidden power button under the status bar clock.

No visual changes looks like the stock status bar:


Attention!

After this changes an Xposed modul can't move, or hide the clock.


Functions:
- Short press on the clock turns off the screen
- Long press, or swipe from the clock top to the bottom opens the power menu.

Needed tools:
Apktool
Notepad++

1. Decompile SystemUI.apk
2. Navigate to \res\layout folder
3. Open status_bar.xml

Add BLUE lines.

Code:
        <LinearLayout android:orientation="horizontal" android:id="@id/system_icon_area" android:layout_width="wrap_content" android:layout_height="fill_parent">
            <LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
            <LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingStart="2.0dip">
                <include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" layout="@layout/signal_cluster_view" />
                <TextView android:textSize="@dimen/status_bar_battery_text_size" android:textColor="#ffffffff" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" android:layout_marginStart="@dimen/status_bar_battery_text_marginStart" />
                <com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="12.0dip" android:layout_height="18.0dip" android:layout_marginBottom="0.33000004dip" android:layout_marginStart="5.0dip" />
            </LinearLayout>
             <FrameLayout android:gravity="center" android:orientation="horizontal" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_centerInParent="true">
              <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:ellipsize="none" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" android:paddingStart="6.0dip" systemui:ampmSmall="false" />
              <com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@null" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" />
             </FrameLayout>
        </LinearLayout>
    </LinearLayout>
    <LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:paddingStart="6.0dip">
4. Save your changes
5. Build SystemUI.apk
6. Push to your Phone, set permissions, reboot

I did it already for the N9005XXUENC2 firmware: Download



Do you have flashable zip?
27th March 2014, 03:45 PM |#3  
Junior Member
Thanks Meter: 1
 
More
nice
The Following User Says Thank You to medo5758 For This Useful Post: [ View ]
27th March 2014, 04:45 PM |#4  
tkari4's Avatar
OP Senior Member
Thanks Meter: 6,830
 
More
Quote:
Originally Posted by AldrichDSaints

Do you have flashable zip?

Flashable zip attached here: http://forum.xda-developers.com/show...&postcount=157

Copy SystemUI.apk in system / priv-app folder, than you can flash it.

Don't forget backup your current SystemUI.apk.
The Following 2 Users Say Thank You to tkari4 For This Useful Post: [ View ]
28th March 2014, 06:18 AM |#5  
kmokhtar79's Avatar
Recognized Contributor
Flag Beijing
Thanks Meter: 11,437
 
Donate to Me
More
@tkari4 Thanks for sharing your guids. I think Note 3 community is missing a development thread like the one in Note (by majdini). so as you have reasonable knowledge about smali things, that would be nice if you could open such thread so that everyone can add his mod/guide/tip to it and all can be found in the same thread.




Sent from my SM-N9005
Last edited by kmokhtar79; 28th March 2014 at 07:08 AM.
The Following 4 Users Say Thank You to kmokhtar79 For This Useful Post: [ View ]
28th March 2014, 07:16 AM |#6  
AldrichDSaints's Avatar
Senior Member
Flag Binan City
Thanks Meter: 26
 
More
Quote:
Originally Posted by tkari4

Flashable zip attached here: http://forum.xda-developers.com/show...&postcount=157

Copy SystemUI.apk in system / priv-app folder, than you can flash it.

Don't forget backup your current SystemUI.apk.


Thanks. I'm gonna try this one
28th March 2014, 08:23 AM |#7  
aly19's Avatar
Senior Member
Thanks Meter: 72
 
More
This mod works great! Thank you!
The Following User Says Thank You to aly19 For This Useful Post: [ View ]
28th March 2014, 09:37 AM |#8  
Senior Member
Thanks Meter: 353
 
More
Quote:
Originally Posted by tkari4

Flashable zip attached here: http://forum.xda-developers.com/show...&postcount=157

Copy SystemUI.apk in system / priv-app folder, than you can flash it.

Don't forget backup your current SystemUI.apk.

Could you provide the download link instead of thread link.um just a noob and dont have that much idea about all this stuff. It will be helpful if you just provide the download link of flashable zip.
Take care

Sent from my SM-N900 using XDA Premium 4 mobile app

---------- Post added at 08:15 AM ---------- Previous post was at 07:45 AM ----------

Will this mod work on n900 octa core firmware version DNA6 KITKAT.
THANKS

Sent from my SM-N900 using XDA Premium 4 mobile app

---------- Post added at 08:37 AM ---------- Previous post was at 08:15 AM ----------

Wprking great...it took time me to understand. ...thanks

Sent from my SM-N900 using XDA Premium 4 mobile app
The Following User Says Thank You to ghalib87 For This Useful Post: [ View ]
2nd April 2014, 06:02 PM |#9  
MEHRDAD595's Avatar
Senior Member
Flag shiraz
Thanks Meter: 371
 
More
just usable on KK?
noway for using on JB?
2nd April 2014, 08:14 PM |#10  
tkari4's Avatar
OP Senior Member
Thanks Meter: 6,830
 
More
Quote:
Originally Posted by MEHRDAD595

just usable on KK?
noway for using on JB?

I'm using this code on 4.1.2 too, so should work on JB.

The Following 2 Users Say Thank You to tkari4 For This Useful Post: [ View ]
2nd April 2014, 08:25 PM |#11  
dr.ketan's Avatar
Recognized Contributor
Flag Gujarat
Thanks Meter: 40,406
 
Donate to Me
More
@tkari4
Needs your help, sent you PM

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes