I have a layout with several tabs. What's happening is that in landscape orientation, the layout is wrapping the text used in the tab titles, but not on a word - its wrapping in the middle of a word! So a title like:
Description
looks fine in portrait but in landscape is shown like this:
Desc
ript
ion
I'm not specifying any word wrap or style attributes for the text. I would imagine the layout would have more space in landscape mode than portrait, so this makes no sense. Would appreciate any advice on what to look at.
Enable or disable text wrapping for a text box, rich text box, or expression box. Right-click the control for which you want to enable or disable text wrapping, and then click Control Properties on the shortcut menu. Click the Display tab. Select or clear the Wrap text check box.
The object that text wraps around is called the wrap object. Text wrap is also referred to as runaround text.
On the Home tab, in the Alignment group, click Wrap Text.
Late response, but Google brought me here, so this might be useful still.
You can choose to scroll the tabs, which I believe is preferable to changing font sizes.
app:tabMode="scrollable"
<android.support.design.widget.TabLayout
android:id="@+id/tablayout_id"
android:layout_height="wrap_content"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
app:tabMode="scrollable"
>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With