How to change the toolbar text size?

Use app:titleTextAppearance: <android.support.v7.widget.Toolbar xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:app=”http://schemas.android.com/apk/res-auto” android:layout_width=”match_parent” android:layout_height=”?actionBarSize” android:id=”@+id/toolbar” app:titleTextAppearance=”@style/Toolbar.TitleText” /> and override the default title size in a custom style: <style name=”Toolbar.TitleText” parent=”TextAppearance.Widget.AppCompat.Toolbar.Title”> <item name=”android:textSize”>18sp</item> </style> Result:

How to change size of title’s text on Action Bar?

Actually, you can do what you want to customize the ActionBar. It must be done through the Theme. You can do something like this : <style name=”Theme.YourTheme” parent=”android:style/Theme”> <item name=”android:actionBarStyle”>@style/Theme.YourTheme.Styled.ActionBar</item> </style> <style name=”Theme.YourTheme.Styled.ActionBar”> <item name=”android:titleTextStyle”>@style/Theme.Viadeo.Styled.YourTheme.TitleTextStyle</item> </style> <style name=”Theme.YourTheme.Styled.ActionBar.TitleTextStyle” parent=”@android:style/Widget.TextView”> <item name=”android:textSize”>12sp</item> </style>

Different font size of strings in the same TextView

Use a Spannable String String s= “Hello Everyone”; SpannableString ss1= new SpannableString(s); ss1.setSpan(new RelativeSizeSpan(2f), 0,5, 0); // set size ss1.setSpan(new ForegroundColorSpan(Color.RED), 0, 5, 0);// set color TextView tv= (TextView) findViewById(R.id.textview); tv.setText(ss1); Snap shot You can split string using space and add span to the string you require. String s= “Hello Everyone”; String[] each = s.split(” … Read more

Text size and different android screen sizes

@forcelain I think you need to check this Google IO Pdf for Design. In that pdf go to Page No:77 in which you will find how there suggesting for using dimens.xml for different devices of android for Example see Below structure : res/values/dimens.xml res/values-small/dimens.xml res/values-normal/dimens.xml res/values-large/dimens.xml res/values-xlarge/dimens.xml for Example you have used below dimens.xml in … Read more

Inline elements shifting when made bold on hover

Pre-set the width by using an invisible pseudo-element which has the same content and styling as the parent hover style. Use a data attribute, like title, as the source for content. li { display: inline-block; font-size: 0; } li a { display:inline-block; text-align:center; font: normal 16px Arial; text-transform: uppercase; } a:hover { font-weight:bold; } /* … Read more