The getWindow () method of the context returns the current view context, to get the Activity title bar, android.id.id.title
View title = getWindow().findViewById(android.R.id.title); View titleBar = (View) title.getParent(); titleBar.setBackgroundColor(Color.RED);`
Dwivedi ji
source share