• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2011 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 
17 package com.android.contacts.detail;
18 
19 import android.view.View.OnClickListener;
20 
21 /**
22  * This is implemented by {@link View}s that contain an alpha layer and touch interceptor layer.
23  * The alpha layer covers the entire fragment and has an alpha value which makes the fragment
24  * contents appear "dimmed" out. The touch interceptor layer covers the entire fragment so that
25  * when visible, it intercepts all touch events on the {@link View}.
26  */
27 public interface ViewOverlay {
28 
29     /**
30      * Sets the alpha value on the alpha layer (if there is one).
31      */
setAlphaLayerValue(float alpha)32     public void setAlphaLayerValue(float alpha);
33 
34     /**
35      * Makes the touch intercept layer on this fragment visible (if there is one). Also adds a click
36      * listener which is called when there is a touch event on the layer.
37      */
enableTouchInterceptor(OnClickListener clickListener)38     public void enableTouchInterceptor(OnClickListener clickListener);
39 
40     /**
41      * Makes the touch intercept layer on this fragment gone (if there is one).
42      */
disableTouchInterceptor()43     public void disableTouchInterceptor();
44 }
45