Friday, 17 June 2016

Change android label color ,size and style

  
  Here I am going to explain how to change android label size,color and style


Step 1) Add Below code in your Activity

            Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
             toolbar.setTitleTextColor(Color.BLACK);
             toolbar.setTitleTextAppearance(this, R.style.MyActionBarTitleText);
             setSupportActionBar(toolbar);

Step 2)Add below code in your style.xml

      <style name="MyActionBarTitleText"
        parent="@android:style/TextAppearance.Holo.Widget.ActionBar.Title">
        <item name="android:textSize">24dp</item>
        <item name="android:textStyle">bold</item>
    </style>


Happy Coding :)