0
を与えるものではありません私はこのコードを、プログラム的に私の「アプリケーションバーのレイアウト」でアクションバーの色を変更しようとしています:変更「アクションバー」の色が正しい色に
toolbar.setBackgroundColor(R.color.hidden_bars); //#464445
が、私は別の色で終わるたびに、ここcolorPrimaryの暗いバージョン(#48bee6)
は私のxmlです:
<android.support.design.widget.AppBarLayout
android:id="@+id/id_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"
app:layout_scrollFlags="enterAlwaysCollapsed" />
<android.support.design.widget.TabLayout
android:id="@+id/tabLayout"
style="@style/WenoTabLayout"
android:layout_width="match_parent"
android:layout_height="@dimen/tab_bar_height"
android:layout_marginTop="1dp"
android:background="@color/white"
app:tabGravity="fill"
app:tabMode="fixed" />
</android.support.design.widget.AppBarLayout>
check colorプライマリとcolorPrimaryDarkのstyle.xmlにあります。 – Reena