Improve pattern layout for tiiiny screens

On small screens < sw400dp,
- Don't show icon
- Don't show "Screen lock options" button

Test: cd tests/robotests && mma
Bug: 72764729
Change-Id: I8d9863d43c877fcc18f504d91d3183760b3fafc2
This commit is contained in:
Maurice Lam
2018-02-14 16:02:33 -08:00
parent bee1a6d990
commit 212dd952a1
9 changed files with 58 additions and 22 deletions

View File

@@ -57,11 +57,13 @@ public class SetupChooseLockPattern extends ChooseLockPattern {
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
Button optionsButton = (Button) view.findViewById(R.id.screen_lock_options);
optionsButton.setVisibility(View.VISIBLE);
optionsButton.setOnClickListener((btn) ->
ChooseLockTypeDialogFragment.newInstance(mUserId)
.show(getChildFragmentManager(), null));
if (!getResources().getBoolean(R.bool.config_lock_pattern_minimal_ui)) {
Button optionsButton = view.findViewById(R.id.screen_lock_options);
optionsButton.setVisibility(View.VISIBLE);
optionsButton.setOnClickListener((btn) ->
ChooseLockTypeDialogFragment.newInstance(mUserId)
.show(getChildFragmentManager(), null));
}
}
@Override