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 | 01054e9 | 2013-12-10 11:06:18 -0800 | [diff] [blame] | 38 | * 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 Kong | b251025 | 2013-12-10 22:58:15 -0800 | [diff] [blame] | 48 | /** Sets the listener. */ |
Angus Kong | 01054e9 | 2013-12-10 11:06:18 -0800 | [diff] [blame] | 49 | void setFilmstripListener(FilmstripLayout.Listener listener); |
| 50 | |
Angus Kong | 1f9db2d | 2014-01-09 00:56:35 -0800 | [diff] [blame] | 51 | /** |
| 52 | * Hides this panel with animation. |
| 53 | * |
| 54 | * @return {@code false} if already hidden. |
| 55 | */ |
| 56 | boolean animateHide(); |
| 57 | |
Angus Kong | 8a2350a | 2013-12-16 15:02:34 -0800 | [diff] [blame] | 58 | /** Hides this panel */ |
Angus Kong | b251025 | 2013-12-10 22:58:15 -0800 | [diff] [blame] | 59 | void hide(); |
| 60 | |
Angus Kong | 8a2350a | 2013-12-16 15:02:34 -0800 | [diff] [blame] | 61 | /** Shows this panel */ |
Angus Kong | b251025 | 2013-12-10 22:58:15 -0800 | [diff] [blame] | 62 | void show(); |
| 63 | |
Angus Kong | 01054e9 | 2013-12-10 11:06:18 -0800 | [diff] [blame] | 64 | /** |
| 65 | * Called when the back key is pressed. |
| 66 | * |
| 67 | * @return Whether the UI responded to the key event. |
| 68 | */ |
| 69 | boolean onBackPressed(); |
| 70 | } |