android toolbar 显示返回按钮并改变按钮颜色
<android.support.design.widget.AppBarLayout
android:id="@+id/about_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/toolbar_theme">
<com.crazier.handprogramlession.view.SuperToolbar
android:id="@+id/article_content_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"/>
</android.support.design.widget.AppBarLayout>
<style name="toolbar_theme" parent="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<item name="colorControlNormal">@color/color_white</item>
</style>
显示返回按钮:
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
posted on 2017-04-12 13:01 guangdeshishe 阅读(2056) 评论(0) 编辑 收藏 举报