Hello I make one AppCompatActivity
as a BaseActivity
and in other all activity I extends with BaseActivity
.
Now in other classes I have to change tittle bar color
and Tittle text
.
This is my toolbar.xml
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:title="@string/app_name" />
And setActionbar
@Override
public void setactionbar(int color) {
// TODO Auto-generated method stub
getSupportActionBar().setBackgroundDrawable(new ColorDrawable(color));
getSupportActionBar().setElevation(0);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
}
But not get success to change color and text
Thanks in Advance.