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