blob: 86c1109ff02afae45376bae429e9eee35088e1fd [file] [log] [blame]
Angus Kong01054e92013-12-10 11:06:18 -08001/*
2 * Copyright (C) 2013 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 com.android.camera.filmstrip;
18
19import com.android.camera.widget.FilmstripLayout;
20
21/**
Angus Kong8a2350a2013-12-16 15:02:34 -080022 * The filmstrip panel holding the filmstrip and other controls/widgets.
Angus Kong01054e92013-12-10 11:06:18 -080023 */
24public interface FilmstripContentPanel {
25 /**
26 * An listener interface extending {@link
27 * com.android.camera.filmstrip.FilmstripController.FilmstripListener} defining extra callbacks
28 * for filmstrip being shown and hidden.
29 */
30 interface Listener extends FilmstripController.FilmstripListener {
31
32 /**
Erin Dahlgren34881882014-01-29 18:13:34 -080033 * Callback on a swipe out of filmstrip.
34 */
35 public void onSwipeOut();
36
37 /**
Angus Kong01054e92013-12-10 11:06:18 -080038 * Callback when the filmstrip becomes invisible or gone.
39 */
40 public void onFilmstripHidden();
41
42 /**
43 * Callback when the filmstrip is shown in full-screen.
44 */
45 public void onFilmstripShown();
46 }
47
Angus Kongb2510252013-12-10 22:58:15 -080048 /** Sets the listener. */
Angus Kong01054e92013-12-10 11:06:18 -080049 void setFilmstripListener(FilmstripLayout.Listener listener);
50
Angus Kong1f9db2d2014-01-09 00:56:35 -080051 /**
52 * Hides this panel with animation.
53 *
54 * @return {@code false} if already hidden.
55 */
56 boolean animateHide();
57
Angus Kong8a2350a2013-12-16 15:02:34 -080058 /** Hides this panel */
Angus Kongb2510252013-12-10 22:58:15 -080059 void hide();
60
Angus Kong8a2350a2013-12-16 15:02:34 -080061 /** Shows this panel */
Angus Kongb2510252013-12-10 22:58:15 -080062 void show();
63
Angus Kong01054e92013-12-10 11:06:18 -080064 /**
65 * Called when the back key is pressed.
66 *
67 * @return Whether the UI responded to the key event.
68 */
69 boolean onBackPressed();
70}