summaryrefslogtreecommitdiff
path: root/com/android/systemui/qs/QSFooter.java
blob: 3f3cea2eaa1777608fe1808f61ef83765e268021 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * Copyright (C) 2017 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.systemui.qs;

import android.support.annotation.Nullable;
import android.view.View;

/**
 * The bottom footer of the quick settings panel.
 */
public interface QSFooter {
    /**
     * Sets the given {@link QSPanel} to be the one that will display the quick settings.
     */
    void setQSPanel(@Nullable QSPanel panel);

    /**
     * Sets whether or not the footer should be visible.
     *
     * @param visibility One of {@link View#VISIBLE}, {@link View#INVISIBLE} or {@link View#GONE}.
     * @see View#setVisibility(int)
     */
    void setVisibility(int visibility);

    /**
     * Sets whether the footer is in an expanded state.
     */
    void setExpanded(boolean expanded);

    /**
     * Returns the full height of the footer.
     */
    int getHeight();

    /**
     * Sets the percentage amount that the quick settings has been expanded.
     *
     * @param expansion A value from 1 to 0 that indicates how much the quick settings have been
     *                  expanded. 1 is fully expanded.
     */
    void setExpansion(float expansion);

    /**
     * Sets whether or not this footer should set itself to listen for changes in any callbacks
     * that it has implemented.
     */
    void setListening(boolean listening);

    /**
     * Sets whether or not the keyguard is currently being shown.
     */
    void setKeyguardShowing(boolean keyguardShowing);

    /**
     * Returns the {@link View} that should expand the quick settings when clicked.
     */
    @Nullable
    View getExpandView();
}