Search code examples
javaandroidandroid-navigation-bar

Custom Navigation Bar across application


I'm interested in an app that customizes the Android NavigationBar across all my applications. The same way that, i.e. NavBar Apps does it.

This far, I found two possibilities, but it doesn't fit exactly what I'm looking for:

SystemBarTint library (here) It only works if you set your app to translucent, and display a background "tint" behind the NavigationBar.

setNavigationBarColor(int color) (here) You can only use a color (and not a drawable) for the NavigationBar.

I want do an app that is always running and can set a drawable instead of the black color of the NavigationBar


Solution

  • I found out a way to customize the NavigationBar in (almost) all apps. (following this)

    Using this permission:

    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    

    Then I created a Service that calls:

    WindowManager.addView(View v, LayoutParams p)
    

    And my MainActivity starts this Service.