• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2016 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 androidx.transition;
18 
19 import android.view.View;
20 
21 import androidx.annotation.NonNull;
22 
23 interface ViewGroupOverlayImpl extends ViewOverlayImpl {
24 
25     /**
26      * Adds a View to the overlay. The bounds of the added view should be
27      * relative to the host view. Any view added to the overlay should be
28      * removed when it is no longer needed or no longer visible.
29      *
30      * <p>Views in the overlay are visual-only; they do not receive input
31      * events and do not participate in focus traversal. Overlay views
32      * are intended to be transient, such as might be needed by a temporary
33      * animation effect.</p>
34      *
35      * <p>If the view has a parent, the view will be removed from that parent
36      * before being added to the overlay. Also, if that parent is attached
37      * in the current view hierarchy, the view will be repositioned
38      * such that it is in the same relative location inside the activity. For
39      * example, if the view's current parent lies 100 pixels to the right
40      * and 200 pixels down from the origin of the overlay's
41      * host view, then the view will be offset by (100, 200).</p>
42      *
43      * @param view The View to be added to the overlay. The added view will be
44      *             drawn when the overlay is drawn.
45      * @see #remove(View)
46      * @see android.view.ViewOverlay#add(android.graphics.drawable.Drawable)
47      */
add(@onNull View view)48     void add(@NonNull View view);
49 
50     /**
51      * Removes the specified View from the overlay.
52      *
53      * @param view The View to be removed from the overlay.
54      * @see #add(View)
55      * @see android.view.ViewOverlay#remove(android.graphics.drawable.Drawable)
56      */
remove(@onNull View view)57     void remove(@NonNull View view);
58 
59 }
60