How to Change Text Size for Android ActionBar


You can change ActionBar Title's text size by simply adding android:textSize attribute to the <style> that you have defined in the styles.xml file.

<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- set the size of action bar title . -->
        <item name="android:textSize">12sp</item>
    </style>
</resources>

Note that the <application> tag in AndroidManifest.xml has the theme set as the value of the name tag in style.xml. Also set the textSize value in sp unit.




Recent Posts:




Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.