[Guide][LP] How to Tint Navbar Color to StatusBar Color

Search This thread

idid idamrep

Senior Member
Nov 23, 2014
130
410
Hi xda

I found very simple way to get tinted navbar color to status bar color in some popular apps like Gmail, YouTube, DropBox. This not affect to all apps.
And I'm sorry if this is repost :angel:

Requirements:
- Know how to decompile recompile
- ApkTool
- Java installed
- Notepad++
- framework-res.apk

Steps:
1. Decompile framework-res.apk
2. Open res/values/styles.xml
3. Search
Code:
<style name="Theme">
scroll down until you find
Code:
<item name="statusBarColor">@color/black</item>
<item name="navigationBarColor">@color/black</item>
change it to
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">?colorPrimaryDark</item>
4. Search
Code:
<style name="Theme.Material" parent="@style/Theme">
scroll down until you find
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">@color/black</item>
change it to
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">?colorPrimaryDark</item>
5. Search
Code:
<style name="Theme.Material.Light" parent="@style/Theme.Light">
scroll down until you find
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">@color/black</item>
change it to
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">?colorPrimaryDark</item>
6. Recompile, sign, push it to system.

ONLY TESTED ON CM12, CM12.1, RR, PA. BUT I THINK IT'LL WORK ALSO ON STOCK ROM

KNOWN ISSUES:
- Only work in portrait mode
- Navbar color went black when keyboard opened


BEFORE
xk2b4l090bm1z1w7g.jpg

AFTER
lig1n6ak3adgley7g.jpg
 
Last edited:

eymentuna

Senior Member
Jun 3, 2014
372
54
Osmaniye
request



Navbar Color to StatusBar Color

xperia z3 compact 5.0.2


framework-res.apk

sytem/framework/ framework-res.apk/rw--r--r--
 

MarcoReckless

Senior Member
Hi xda

I found very simple way to get tinted navbar color to status bar color in some popular apps like Gmail, YouTube, DropBox. This not affect to all apps.
And I'm sorry if this is repost :angel:

Requirements:
- Know how to decompile recompile
- ApkTool
- Java installed
- Notepad++
- framework-res.apk

Steps:
1. Decompile framework-res.apk
2. Open res/values/styles.xml
3. Search
Code:
<style name="Theme">
scroll down until you find
Code:
<item name="statusBarColor">@color/black</item>
<item name="navigationBarColor">@color/black</item>
change it to
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">?colorPrimaryDark</item>
4. Search
Code:
<style name="Theme.Material" parent="@style/Theme">
scroll down until you find
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">@color/black</item>
change it to
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">?colorPrimaryDark</item>
5. Search
Code:
<style name="Theme.Material.Light" parent="@style/Theme.Light">
scroll down until you find
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">@color/black</item>
change it to
Code:
<item name="statusBarColor">?colorPrimaryDark</item>
<item name="navigationBarColor">?colorPrimaryDark</item>
6. Recompile, sign, push it to system.

ONLY TESTED ON CM12, CM12.1, RR, PA. BUT I THINK IT'LL WORK ALSO ON STOCK ROM

BEFORE
xk2b4l090bm1z1w7g.jpg

AFTER
lig1n6ak3adgley7g.jpg
Cool guide, but i have 2 questions, how did u get that carrier logo, and is there a way to do the tint, but for all apps? (like Lolistat)
 

idid idamrep

Senior Member
Nov 23, 2014
130
410

Araib93

Senior Member
Jan 7, 2013
423
210
Rawalpindi
There is a problem with this mod, though it works fine but in messaging app it chooses color of main screen and keeps it through out other conversations (image attached for explanation)

Edit: Also navbar is black when keyboard is opened.. Thought it would be same color as status bar..
 

Attachments

  • Screenshot_2015-08-21-19-40-24.png
    Screenshot_2015-08-21-19-40-24.png
    38.1 KB · Views: 1,451
  • Screenshot_2015-08-21-19-47-53.png
    Screenshot_2015-08-21-19-47-53.png
    70.3 KB · Views: 1,422
Last edited:

Rajeev

Recognized Contributor
Nov 24, 2012
16,306
26,540
Chennai , I N D I A
Xiaomi 13 Pro

Geeks Empire

Senior Member
Aug 29, 2014
1,311
1,265
Nashville
GeeksEmpire.co
Info

Well Done!
& This is for Android App Developers to Set Color for NavBar/StatusBar in their apps
Code:
int API = android.os.Build.VERSION.SDK_INT;
if(API > 20){
Window window = this.getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
window.setStatusBarColor(Color.parseColor("#COLOR_CODE"));
getWindow().setNavigationBarColor(Color.parseColor("#COLOR_CODE"));
}

Used in my Apps
# Floating Shortcuts >> Xda-Project
# ASAPP Service >> Xda-Project
# Get Translate


:good:
 

komil85

Senior Member
Feb 12, 2013
75
15
38
Thanks. It worked in my Z1C stock lollipop rom.
Edit: Doesn't work in landscape mode, Color reverts back to original in landscape mode but works fine in portrait mode. Any suggestion why its happening? Also i would like to mention that when i try to move framework-res.apk to system/framework folder my device crashes and reboot itself but it work even though it crashes.
 
Last edited:
  • Like
Reactions: idid idamrep

G.Pawar

Senior Member
Oct 26, 2014
295
115
28
Hey bro can I use this guidelines in My Xperia Kitkat device

Sent from my D2105 using XDA Free mobile app
 

Top Liked Posts

  • There are no posts matching your filters.
  • 47
    Hi xda

    I found very simple way to get tinted navbar color to status bar color in some popular apps like Gmail, YouTube, DropBox. This not affect to all apps.
    And I'm sorry if this is repost :angel:

    Requirements:
    - Know how to decompile recompile
    - ApkTool
    - Java installed
    - Notepad++
    - framework-res.apk

    Steps:
    1. Decompile framework-res.apk
    2. Open res/values/styles.xml
    3. Search
    Code:
    <style name="Theme">
    scroll down until you find
    Code:
    <item name="statusBarColor">@color/black</item>
    <item name="navigationBarColor">@color/black</item>
    change it to
    Code:
    <item name="statusBarColor">?colorPrimaryDark</item>
    <item name="navigationBarColor">?colorPrimaryDark</item>
    4. Search
    Code:
    <style name="Theme.Material" parent="@style/Theme">
    scroll down until you find
    Code:
    <item name="statusBarColor">?colorPrimaryDark</item>
    <item name="navigationBarColor">@color/black</item>
    change it to
    Code:
    <item name="statusBarColor">?colorPrimaryDark</item>
    <item name="navigationBarColor">?colorPrimaryDark</item>
    5. Search
    Code:
    <style name="Theme.Material.Light" parent="@style/Theme.Light">
    scroll down until you find
    Code:
    <item name="statusBarColor">?colorPrimaryDark</item>
    <item name="navigationBarColor">@color/black</item>
    change it to
    Code:
    <item name="statusBarColor">?colorPrimaryDark</item>
    <item name="navigationBarColor">?colorPrimaryDark</item>
    6. Recompile, sign, push it to system.

    ONLY TESTED ON CM12, CM12.1, RR, PA. BUT I THINK IT'LL WORK ALSO ON STOCK ROM

    KNOWN ISSUES:
    - Only work in portrait mode
    - Navbar color went black when keyboard opened


    BEFORE
    xk2b4l090bm1z1w7g.jpg

    AFTER
    lig1n6ak3adgley7g.jpg
    5
    Goto res/values/colors.xml in framework-res.apk > find <color name="input_method_navigation_guard">#ff000000</color> replace to be like this <color name="input_method_navigation_guard">#00000000</color>
    Fix by Andro Black
    S2qa3kYg_SYor_goZy4H1RdBsn0BMWAfgfCnZC7ClYM
    2
    Info

    Well Done!
    & This is for Android App Developers to Set Color for NavBar/StatusBar in their apps
    Code:
    int API = android.os.Build.VERSION.SDK_INT;
    if(API > 20){
    Window window = this.getWindow();
    window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
    window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
    window.setStatusBarColor(Color.parseColor("#COLOR_CODE"));
    getWindow().setNavigationBarColor(Color.parseColor("#COLOR_CODE"));
    }

    Used in my Apps
    # Floating Shortcuts >> Xda-Project
    # ASAPP Service >> Xda-Project
    # Get Translate


    :good:
    1
    Working on eXistenZ Y :)