Dream settings refactor.

We will be re-using the grid UI for the dream complication picker, so
this change refactors some of that logic so it can be re-used in the
complication controller.

We also update some of the UI here to match the most recent UX
decisions.

http://screen/BxhAwZwQSVoxUmN.png

Test: locally on device
Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.dream.DreamPickerControllerTest"
Bug: 214250590
Bug: 215703483
Change-Id: I9fbfa0f0cd31ae3d119c7cd1a9562d4cdb203d6c
This commit is contained in:
Lucas Silva
2022-01-26 16:49:22 +00:00
parent 99bd4e45c7
commit 55df7acc51
11 changed files with 335 additions and 219 deletions

View File

@@ -0,0 +1,35 @@
/*
* Copyright (C) 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.dream;
import android.graphics.drawable.Drawable;
interface IDreamItem {
CharSequence getTitle();
Drawable getIcon();
void onItemClicked();
void onCustomizeClicked();
Drawable getPreviewImage();
boolean isActive();
boolean allowCustomization();
}