Created
January 13, 2018 02:01
-
-
Save gvr23/3a9e4ada1ede2ab903d875100fbf6b94 to your computer and use it in GitHub Desktop.
manera para setear un toolbar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ANDROID | |
=================================================================================================================================== | |
setSupportActionBar(tbDocumento); | |
ActionBar actBar = getSupportActionBar(); | |
if (actBar != null) { | |
actBar.setDisplayHomeAsUpEnabled(true); | |
actBar.setIcon(R.drawable.ic_shopping_cart); | |
actBar.setHomeAsUpIndicator(R.drawable.ic_arrow_back); | |
actBar.setTitle("Editar Documento"); | |
actBar.setDisplayShowTitleEnabled(true); | |
} | |
================================================================================================================================== | |
xml | |
================================================================================================================================== | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/tbDocumento" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="@color/color_primary" | |
app:titleMarginStart="@dimen/margin_large" | |
style="@style/TitleStyle" | |
app:titleTextColor="@color/color_white"/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment