I want to change the color of the title bar dynamically, ie: someone clicks a button, it changes the color. However, I can\'t seem to get it to fill the entire title bar. This o
try this
titleBar = (RelativeLayout) findViewById(R.id.title_bar); final FrameLayout titleContainer = (FrameLayout)titleBar.getParent(); titleContainer.setPadding(0, 0, 0, 0) titleBar.setBackgroundResource(R.color.title_bar_green);