blob: c881c18e30ffcf5c825d116833750a9d0ffd5598 [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 Kong73e09f32014-02-25 23:45:52 -080038 * Callback on a swiping out begins.
39 */
40 public void onSwipeOutBegin();
41
42 /**
Angus Kong01054e92013-12-10 11:06:18 -080043 * Callback when the filmstrip becomes invisible or gone.
44 */
45 public void onFilmstripHidden();
46
47 /**
48 * Callback when the filmstrip is shown in full-screen.
49 */
50 public void onFilmstripShown();
51 }
52
Angus Kongb2510252013-12-10 22:58:15 -080053 /** Sets the listener. */
Angus Kong01054e92013-12-10 11:06:18 -080054 void setFilmstripListener(FilmstripLayout.Listener listener);
55
Angus Kong1f9db2d2014-01-09 00:56:35 -080056 /**
57 * Hides this panel with animation.
58 *
59 * @return {@code false} if already hidden.
60 */
61 boolean animateHide();
62
Angus Kong8a2350a2013-12-16 15:02:34 -080063 /** Hides this panel */
Angus Kongb2510252013-12-10 22:58:15 -080064 void hide();
65
Angus Kong8a2350a2013-12-16 15:02:34 -080066 /** Shows this panel */
Angus Kongb2510252013-12-10 22:58:15 -080067 void show();
68
Angus Kong01054e92013-12-10 11:06:18 -080069 /**
70 * Called when the back key is pressed.
71 *
72 * @return Whether the UI responded to the key event.
73 */
74 boolean onBackPressed();
75}