• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 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 package com.android.systemui.qs;
17 
18 import android.support.annotation.Nullable;
19 import android.view.View;
20 
21 /**
22  * The bottom footer of the quick settings panel.
23  */
24 public interface QSFooter {
25     /**
26      * Sets the given {@link QSPanel} to be the one that will display the quick settings.
27      */
setQSPanel(@ullable QSPanel panel)28     void setQSPanel(@Nullable QSPanel panel);
29 
30     /**
31      * Sets whether or not the footer should be visible.
32      *
33      * @param visibility One of {@link View#VISIBLE}, {@link View#INVISIBLE} or {@link View#GONE}.
34      * @see View#setVisibility(int)
35      */
setVisibility(int visibility)36     void setVisibility(int visibility);
37 
38     /**
39      * Sets whether the footer is in an expanded state.
40      */
setExpanded(boolean expanded)41     void setExpanded(boolean expanded);
42 
43     /**
44      * Returns the full height of the footer.
45      */
getHeight()46     int getHeight();
47 
48     /**
49      * Sets the percentage amount that the quick settings has been expanded.
50      *
51      * @param expansion A value from 1 to 0 that indicates how much the quick settings have been
52      *                  expanded. 1 is fully expanded.
53      */
setExpansion(float expansion)54     void setExpansion(float expansion);
55 
56     /**
57      * Sets whether or not this footer should set itself to listen for changes in any callbacks
58      * that it has implemented.
59      */
setListening(boolean listening)60     void setListening(boolean listening);
61 
62     /**
63      * Sets whether or not the keyguard is currently being shown.
64      */
setKeyguardShowing(boolean keyguardShowing)65     void setKeyguardShowing(boolean keyguardShowing);
66 
67     /**
68      * Returns the {@link View} that should expand the quick settings when clicked.
69      */
70     @Nullable
getExpandView()71     View getExpandView();
72 }
73