ViewOverlayImpl.java revision 4d1d6a17310a57807dabb3f404715cfe43a90ed0
14e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki/*
24e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki * Copyright (C) 2016 The Android Open Source Project
34e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki *
44e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki * Licensed under the Apache License, Version 2.0 (the "License");
54e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki * you may not use this file except in compliance with the License.
64e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki * You may obtain a copy of the License at
74e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki *
84e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki *      http://www.apache.org/licenses/LICENSE-2.0
94e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki *
104e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki * Unless required by applicable law or agreed to in writing, software
114e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki * distributed under the License is distributed on an "AS IS" BASIS,
124e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
134e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki * See the License for the specific language governing permissions and
144e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki * limitations under the License.
154e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki */
164e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki
17ac5fe7c617c66850fff75a9fce9979c6e5674b0fAurimas Liutikaspackage androidx.transition;
184e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki
194e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Arakiimport android.graphics.drawable.Drawable;
204d1d6a17310a57807dabb3f404715cfe43a90ed0Aurimas Liutikas
21ac5fe7c617c66850fff75a9fce9979c6e5674b0fAurimas Liutikasimport androidx.annotation.NonNull;
22ac5fe7c617c66850fff75a9fce9979c6e5674b0fAurimas Liutikasimport androidx.annotation.RequiresApi;
234e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki
244e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki@RequiresApi(14)
254e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Arakiinterface ViewOverlayImpl {
264e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki
274e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki    /**
284e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     * Adds a Drawable to the overlay. The bounds of the drawable should be relative to
294e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     * the host view. Any drawable added to the overlay should be removed when it is no longer
304e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     * needed or no longer visible.
314e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     *
324e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     * @param drawable The Drawable to be added to the overlay. This drawable will be
334e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     *                 drawn when the view redraws its overlay.
344e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     * @see #remove(Drawable)
354e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     */
364e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki    void add(@NonNull Drawable drawable);
374e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki
384e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki    /**
394e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     * Removes all content from the overlay.
404e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     */
414e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki    void clear();
424e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki
434e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki    /**
444e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     * Removes the specified Drawable from the overlay.
454e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     *
464e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     * @param drawable The Drawable to be removed from the overlay.
474e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     * @see #add(Drawable)
484e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki     */
494e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki    void remove(@NonNull Drawable drawable);
504e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki
514e5a72756eb66c31baf1a3054c66520f1c3f5b8cYuichi Araki}
52