2015-11-27 48 views

回答

1

使用此您的活動

if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { 
    getWindow().setNavigationBarColor(getResources().getColor(R.color.blue)); 
} 

接下來的代碼,我會只顯示在API版本一起使用上面的21

<item name="android:navigationBarColor">@color/theme_color</item> 

window.setNavigationBarColor(@ColorInt int color) 

http://developer.android.com/reference/android/view/Window.html#setNavigationBarColor(int)

我認爲它只能通過具有材質設計的Android版本進行更改。 更多信息here到。

+0

我已經知道如何實現它上面21.我正在尋找一種方式做下21 – MarshallLee

+0

同樣的事情,我覺得你不能這樣做,因爲它僅出現以上的21材料設計就像你可以在這裏看到HTTPS: //developer.android.com/training/material/theme.html 對不起,我明白了錯誤。 –