Angus Kong | 01054e9 | 2013-12-10 11:06:18 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package com.android.camera.filmstrip; |
| 18 | |
| 19 | import com.android.camera.widget.FilmstripLayout; |
| 20 | |
| 21 | /** |
Angus Kong | 8a2350a | 2013-12-16 15:02:34 -0800 | [diff] [blame] | 22 | * The filmstrip panel holding the filmstrip and other controls/widgets. |
Angus Kong | 01054e9 | 2013-12-10 11:06:18 -0800 | [diff] [blame] | 23 | */ |
| 24 | public 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 Dahlgren | 3488188 | 2014-01-29 18:13:34 -0800 | [diff] [blame] | 33 | * Callback on a swipe out of filmstrip. |
| 34 | */ |
| 35 | public void onSwipeOut(); |
| 36 | |
| 37 | /** |
Angus Kong | 73e09f3 | 2014-02-25 23:45:52 -0800 | [diff] [blame] | 38 | * Callback on a swiping out begins. |
| 39 | */ |
| 40 | public void onSwipeOutBegin(); |
| 41 | |
| 42 | /** |
Angus Kong | 01054e9 | 2013-12-10 11:06:18 -0800 | [diff] [blame] | 43 | * 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 Kong | b251025 | 2013-12-10 22:58:15 -0800 | [diff] [blame] | 53 | /** Sets the listener. */ |
Angus Kong | 01054e9 | 2013-12-10 11:06:18 -0800 | [diff] [blame] | 54 | void setFilmstripListener(FilmstripLayout.Listener listener); |
| 55 | |
Angus Kong | 1f9db2d | 2014-01-09 00:56:35 -0800 | [diff] [blame] | 56 | /** |
| 57 | * Hides this panel with animation. |
| 58 | * |
| 59 | * @return {@code false} if already hidden. |
| 60 | */ |
| 61 | boolean animateHide(); |
| 62 | |
Angus Kong | 8a2350a | 2013-12-16 15:02:34 -0800 | [diff] [blame] | 63 | /** Hides this panel */ |
Angus Kong | b251025 | 2013-12-10 22:58:15 -0800 | [diff] [blame] | 64 | void hide(); |
| 65 | |
Angus Kong | 8a2350a | 2013-12-16 15:02:34 -0800 | [diff] [blame] | 66 | /** Shows this panel */ |
Angus Kong | b251025 | 2013-12-10 22:58:15 -0800 | [diff] [blame] | 67 | void show(); |
| 68 | |
Angus Kong | 01054e9 | 2013-12-10 11:06:18 -0800 | [diff] [blame] | 69 | /** |
| 70 | * Called when the back key is pressed. |
| 71 | * |
| 72 | * @return Whether the UI responded to the key event. |
| 73 | */ |
| 74 | boolean onBackPressed(); |
| 75 | } |