I am using AppCompatActivity
with following
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/red"
android:fitsSystemWindows="true"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:popupTheme="@style/AppTheme.PopupOverlay"
app:navigationIcon="@mipmap/app_icon"
/>
</android.support.design.widget.AppBarLayout>
Let's say the background is set to red, it is fine in the main activity, but my other activity restore to default blue when open. what did I miss?
edit: I am not saying to set the background of the activity, but only the toolbar.