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