TaskViewTransform.java revision 54e297a5bb143e60e29fd7dfe87e04a8cc96c72c
1/*
2 * Copyright (C) 2014 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.android.systemui.recents.views;
18
19import android.graphics.Rect;
20
21
22/* The transform state for a task view */
23public class TaskViewTransform {
24    public int translationY = 0;
25    public float scale = 1f;
26    public float alpha = 1f;
27    public float dismissAlpha = 1f;
28    public boolean visible = false;
29    public Rect rect = new Rect();
30    float t;
31
32    public TaskViewTransform() {
33        // Do nothing
34    }
35
36    public TaskViewTransform(TaskViewTransform o) {
37        translationY = o.translationY;
38        scale = o.scale;
39        alpha = o.alpha;
40        dismissAlpha = o.dismissAlpha;
41        visible = o.visible;
42        rect.set(o.rect);
43        t = o.t;
44    }
45
46    @Override
47    public String toString() {
48        return "TaskViewTransform y: " + translationY + " scale: " + scale + " alpha: " + alpha +
49                " visible: " + visible + " rect: " + rect + " dismissAlpha: " + dismissAlpha;
50    }
51}
52