Apply phrase based line breaking on most of preference.
Bug: 232992171 Test: manual Change-Id: I5104e9d30f744f892bd921bffa168488e1c1e625
This commit is contained in:
@@ -34,5 +34,6 @@
|
|||||||
android:ellipsize="end"
|
android:ellipsize="end"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
style="@style/MainSwitchText.Settingslib" />
|
style="@style/MainSwitchText.Settingslib" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -60,6 +60,7 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:ellipsize="marquee" />
|
android:ellipsize="marquee" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -71,6 +72,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:maxLines="10" />
|
android:maxLines="10" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@@ -52,6 +52,7 @@
|
|||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:maxLines="2" />
|
android:maxLines="2" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@@ -57,6 +57,7 @@
|
|||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:duplicateParentState="true"
|
android:duplicateParentState="true"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
/>
|
/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@android:id/summary"
|
android:id="@android:id/summary"
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:duplicateParentState="true"
|
android:duplicateParentState="true"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
/>
|
/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<TextView
|
<TextView
|
||||||
|
@@ -29,6 +29,7 @@
|
|||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textColor="?android:attr/textColorSecondary" />
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
<com.android.settings.fuelgauge.BatteryActiveView
|
<com.android.settings.fuelgauge.BatteryActiveView
|
||||||
|
@@ -59,7 +59,8 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
android:text="@string/customize_button_title"
|
android:text="@string/customize_button_title"
|
||||||
android:hyphenationFrequency="full"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
app:layout_constraintTop_toTopOf="@+id/preview"
|
app:layout_constraintTop_toTopOf="@+id/preview"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/preview"
|
app:layout_constraintBottom_toBottomOf="@+id/preview"
|
||||||
app:layout_constraintStart_toStartOf="@+id/preview"
|
app:layout_constraintStart_toStartOf="@+id/preview"
|
||||||
|
@@ -63,6 +63,7 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:ellipsize="marquee"/>
|
android:ellipsize="marquee"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -77,6 +78,7 @@
|
|||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:maxLines="4"
|
android:maxLines="4"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
style="@style/PreferenceSummaryTextStyle"/>
|
style="@style/PreferenceSummaryTextStyle"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -31,6 +31,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:layout_weight="1" />
|
android:layout_weight="1" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:gravity="end|bottom" />
|
android:gravity="end|bottom" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium" />
|
android:textAppearance="?android:attr/textAppearanceMedium" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -52,6 +53,7 @@
|
|||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@@ -62,6 +62,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:fadingEdge="horizontal"/>
|
android:fadingEdge="horizontal"/>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@android:id/summary"
|
android:id="@android:id/summary"
|
||||||
@@ -76,6 +77,7 @@
|
|||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:maxLines="4" />
|
android:maxLines="4" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -46,6 +46,7 @@
|
|||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:fadingEdge="horizontal"/>
|
android:fadingEdge="horizontal"/>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@android:id/widget_frame"
|
android:id="@android:id/widget_frame"
|
||||||
|
@@ -58,6 +58,7 @@
|
|||||||
android:layout_alignStart="@android:id/title"
|
android:layout_alignStart="@android:id/title"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:maxLines="2" />
|
android:maxLines="2" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@@ -36,6 +36,7 @@
|
|||||||
android:singleLine="true"
|
android:singleLine="true"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItem"
|
android:textAppearance="?android:attr/textAppearanceListItem"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textColor="?android:attr/textColorPrimary" />
|
android:textColor="?android:attr/textColorPrimary" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -46,6 +47,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textColor="?android:attr/textColorSecondary" />
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
|
|
||||||
<include
|
<include
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:ellipsize="marquee"
|
android:ellipsize="marquee"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:fadingEdge="horizontal" />
|
android:fadingEdge="horizontal" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -52,6 +53,7 @@
|
|||||||
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body1"
|
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body1"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:maxLines="10" />
|
android:maxLines="10" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@@ -48,6 +48,7 @@
|
|||||||
android:layout_gravity="start|center"
|
android:layout_gravity="start|center"
|
||||||
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2"
|
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Body2"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textColor="?android:attr/colorAccent"/>
|
android:textColor="?android:attr/colorAccent"/>
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
|
@@ -76,6 +76,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:textAlignment="viewStart"
|
android:textAlignment="viewStart"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textColor="?android:attr/textColorSecondary" />
|
android:textColor="?android:attr/textColorSecondary" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@@ -77,6 +77,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:maxLines="10" />
|
android:maxLines="10" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@@ -74,6 +74,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:maxLines="10" />
|
android:maxLines="10" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@@ -34,6 +34,7 @@
|
|||||||
android:paddingStart="20dp"
|
android:paddingStart="20dp"
|
||||||
android:drawableStart="?android:attr/listChoiceIndicatorSingle"
|
android:drawableStart="?android:attr/listChoiceIndicatorSingle"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:ellipsize="marquee" />
|
android:ellipsize="marquee" />
|
||||||
|
|
||||||
|
|
||||||
@@ -45,6 +46,7 @@
|
|||||||
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
|
||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:maxLines="10" />
|
android:maxLines="10" />
|
||||||
|
|
||||||
</com.android.settings.CheckableLinearLayout>
|
</com.android.settings.CheckableLinearLayout>
|
||||||
|
@@ -56,6 +56,7 @@
|
|||||||
android:fadingEdge="horizontal"
|
android:fadingEdge="horizontal"
|
||||||
android:maxLines="2"
|
android:maxLines="2"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textAppearance="?android:attr/textAppearanceListItem"/>
|
android:textAppearance="?android:attr/textAppearanceListItem"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@@ -65,6 +66,7 @@
|
|||||||
android:textDirection="locale"
|
android:textDirection="locale"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall"
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textColor="?android:attr/textColorSecondary"/>
|
android:textColor="?android:attr/textColorSecondary"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -33,7 +33,8 @@
|
|||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Display1"
|
android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Display1"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
/>
|
android:lineBreakWordStyle="phrase"
|
||||||
|
/>
|
||||||
|
|
||||||
<TextView android:id="@android:id/summary"
|
<TextView android:id="@android:id/summary"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -42,6 +43,7 @@
|
|||||||
android:textColor="?android:attr/textColorSecondary"
|
android:textColor="?android:attr/textColorSecondary"
|
||||||
android:paddingBottom="5dp"
|
android:paddingBottom="5dp"
|
||||||
android:hyphenationFrequency="normalFast"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:maxLines="10" />
|
android:maxLines="10" />
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
|
@@ -17,5 +17,6 @@
|
|||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hyphenationFrequency="normal"
|
android:hyphenationFrequency="normalFast"
|
||||||
|
android:lineBreakWordStyle="phrase"
|
||||||
android:textAppearance="?android:attr/textAppearanceSmall" />
|
android:textAppearance="?android:attr/textAppearanceSmall" />
|
||||||
|
@@ -23,6 +23,7 @@ import android.content.ComponentName;
|
|||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
|
import android.graphics.text.LineBreakConfig;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
@@ -109,6 +110,12 @@ public class SettingsBaseActivity extends FragmentActivity implements CategoryHa
|
|||||||
if (mCollapsingToolbarLayout != null) {
|
if (mCollapsingToolbarLayout != null) {
|
||||||
mCollapsingToolbarLayout.setLineSpacingMultiplier(TOOLBAR_LINE_SPACING_MULTIPLIER);
|
mCollapsingToolbarLayout.setLineSpacingMultiplier(TOOLBAR_LINE_SPACING_MULTIPLIER);
|
||||||
mCollapsingToolbarLayout.setHyphenationFrequency(HYPHENATION_FREQUENCY_NORMAL_FAST);
|
mCollapsingToolbarLayout.setHyphenationFrequency(HYPHENATION_FREQUENCY_NORMAL_FAST);
|
||||||
|
mCollapsingToolbarLayout.setStaticLayoutBuilderConfigurer(builder ->
|
||||||
|
builder.setLineBreakConfig(
|
||||||
|
new LineBreakConfig.Builder()
|
||||||
|
.setLineBreakWordStyle(
|
||||||
|
LineBreakConfig.LINE_BREAK_WORD_STYLE_PHRASE)
|
||||||
|
.build()));
|
||||||
}
|
}
|
||||||
disableCollapsingToolbarLayoutScrollingBehavior();
|
disableCollapsingToolbarLayoutScrollingBehavior();
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user