Add line break strategy to remove header hyphenation
This change sets line break strategy and the max lines limit for the private space setup choose lock screen header Screenshot: go/ss/8CFXUAUkKXAZiPM.png Bug: 331538317 Test: Manual Change-Id: I8c8bd8d130dc0d61d050d274ac0b734a6c5e3d21
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
package com.android.settings.privatespace;
|
package com.android.settings.privatespace;
|
||||||
|
|
||||||
|
import static android.text.Layout.BREAK_STRATEGY_SIMPLE;
|
||||||
|
|
||||||
import static com.android.settings.privatespace.PrivateSpaceSetupActivity.EXTRA_ACTION_TYPE;
|
import static com.android.settings.privatespace.PrivateSpaceSetupActivity.EXTRA_ACTION_TYPE;
|
||||||
import static com.android.settings.privatespace.PrivateSpaceSetupActivity.SET_LOCK_ACTION;
|
import static com.android.settings.privatespace.PrivateSpaceSetupActivity.SET_LOCK_ACTION;
|
||||||
|
|
||||||
@@ -47,6 +49,7 @@ import com.google.android.setupdesign.GlifLayout;
|
|||||||
*/
|
*/
|
||||||
public class PrivateSpaceSetLockFragment extends InstrumentedFragment {
|
public class PrivateSpaceSetLockFragment extends InstrumentedFragment {
|
||||||
private static final String TAG = "PrivateSpaceSetLockFrag";
|
private static final String TAG = "PrivateSpaceSetLockFrag";
|
||||||
|
private static final int HEADER_TEXT_MAX_LINES = 4;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(
|
public View onCreateView(
|
||||||
@@ -60,6 +63,8 @@ public class PrivateSpaceSetLockFragment extends InstrumentedFragment {
|
|||||||
GlifLayout rootView =
|
GlifLayout rootView =
|
||||||
(GlifLayout)
|
(GlifLayout)
|
||||||
inflater.inflate(R.layout.private_space_setlock_screen, container, false);
|
inflater.inflate(R.layout.private_space_setlock_screen, container, false);
|
||||||
|
rootView.getHeaderTextView().setBreakStrategy(BREAK_STRATEGY_SIMPLE);
|
||||||
|
rootView.getHeaderTextView().setMaxLines(HEADER_TEXT_MAX_LINES);
|
||||||
final FooterBarMixin mixin = rootView.getMixin(FooterBarMixin.class);
|
final FooterBarMixin mixin = rootView.getMixin(FooterBarMixin.class);
|
||||||
mixin.setPrimaryButton(
|
mixin.setPrimaryButton(
|
||||||
new FooterButton.Builder(getContext())
|
new FooterButton.Builder(getContext())
|
||||||
|
Reference in New Issue
Block a user