9

I want to change the soft keys(Not sure about name of these buttons all together) background from black to transparent in my app so that users will get a complete visibility of items in listview in my app. I found this feature in Google photos android app. Please that app screenshot here.

https://lh3.googleusercontent.com/_J3bZG-H80ojW-bIz5wPfneLV8s83XViANUZ9Fdh2-qWIsrgX83FbttNb44_cHxj1w=h900-rw

Please some one could help me find a reference document or code to achieve this functionality. Thanks in advance.

Anees U
  • 1,077
  • 1
  • 12
  • 20
  • There is a similar question here. But no answer for that also: http://stackoverflow.com/questions/27854013/how-to-customize-soft-input-key-board-with-gif-images-in-android – Anees U Sep 05 '15 at 09:32
  • Check this: http://stackoverflow.com/questions/26474125/android-4-4-translucent-status-and-navigation-bars-style-on-android-5-0 – La Machine Sep 05 '15 at 09:52

2 Answers2

3

Soft keys all together are called Navigation Bar.

To make it transparent add this line to your activity style (for API 19 and above):

<item name="android:windowTranslucentNavigation">true</item>
dzikovskyy
  • 5,027
  • 3
  • 32
  • 43
2

This is possible to do for API level 21+ Put this style in your v21/themes.xml and use it as your application theme

<style name="MyApplicationTheme" parent="Theme.AppCompat.NoActionBar">
    <item name="android:navigationBarColor">#4D000000</item>
</style>

Keep in mind that your activity should also be full screen to go below the navigation bar (soft keys)

For an activity that extends AppCompatActivity, you can do it in code by:

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
    getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
}
Nima K
  • 995
  • 1
  • 8
  • 15