Merge "Add empty view to desktop tile in overview" into tm-qpr-dev

This commit is contained in:
Ats Jenk
2023-02-22 19:30:55 +00:00
committed by Android (Google) Code Review
5 changed files with 45 additions and 0 deletions

View File

@@ -92,6 +92,7 @@ public class DesktopTaskView extends TaskView {
private final ArrayList<CancellableTask<?>> mPendingThumbnailRequests = new ArrayList<>();
private View mBackgroundView;
private View mEmptyView;
public DesktopTaskView(Context context) {
this(context, null);
@@ -110,6 +111,7 @@ public class DesktopTaskView extends TaskView {
super.onFinishInflate();
mBackgroundView = findViewById(R.id.background);
mEmptyView = findViewById(R.id.empty_view);
int topMarginPx =
mActivity.getDeviceProfile().overviewTaskThumbnailTopMarginPx;
@@ -185,6 +187,8 @@ public class DesktopTaskView extends TaskView {
mSnapshotViewMap.put(task.key.id, snapshotView);
}
mEmptyView.setVisibility(mTasks.isEmpty() ? View.VISIBLE : View.GONE);
updateTaskIdContainer();
updateTaskIdAttributeContainer();