OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.chrome.browser.widget.bottomsheet; | 5 package org.chromium.chrome.browser.widget.bottomsheet; |
6 | 6 |
7 import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.BottomSheetCon tent; | |
8 | |
7 /** | 9 /** |
8 * An interface for notifications about the state of the bottom sheet. | 10 * An interface for notifications about the state of the bottom sheet. |
9 */ | 11 */ |
10 public interface BottomSheetObserver { | 12 public interface BottomSheetObserver { |
11 /** | 13 /** |
12 * A notification that the sheet has been opened, meaning the sheet is any h eight greater | 14 * A notification that the sheet has been opened, meaning the sheet is any h eight greater |
13 * than its peeking state. | 15 * than its peeking state. |
14 */ | 16 */ |
15 void onSheetOpened(); | 17 void onSheetOpened(); |
16 | 18 |
(...skipping 23 matching lines...) Expand all Loading... | |
40 * state. Once the sheet is outside the peek-half range, this event will no longer be | 42 * state. Once the sheet is outside the peek-half range, this event will no longer be |
41 * called. This event is guaranteed to be called at least once with 0.0f in the peeking state | 43 * called. This event is guaranteed to be called at least once with 0.0f in the peeking state |
42 * and 1.0f at or past the half state. This means if the sheet is set to the full state from | 44 * and 1.0f at or past the half state. This means if the sheet is set to the full state from |
43 * the peeking state, this event will be called a single time with 1.0f. | 45 * the peeking state, this event will be called a single time with 1.0f. |
44 * | 46 * |
45 * @param transitionFraction The fraction of the way to the half expanded st ate that the | 47 * @param transitionFraction The fraction of the way to the half expanded st ate that the |
46 * sheet is. This will be 0.0f when the sheet is p eeking and 1.0f | 48 * sheet is. This will be 0.0f when the sheet is p eeking and 1.0f |
47 * when the sheet is half expanded. | 49 * when the sheet is half expanded. |
48 */ | 50 */ |
49 void onTransitionPeekToHalf(float transitionFraction); | 51 void onTransitionPeekToHalf(float transitionFraction); |
52 | |
53 /** | |
54 * An event for when the sheet changes state. | |
55 * @param newState The new sheet state. See {@link BottomSheet.SheetState}. | |
56 */ | |
57 void onSheetStateChanged(int newState); | |
mdjones
2017/03/17 18:17:26
@SheetState
Theresa
2017/03/17 20:26:30
Done.
| |
58 | |
59 /** | |
60 * An event for when the sheet content changes. | |
61 * @param newContent The new {@link BottomSheetContent}. | |
62 */ | |
63 void onSheetContentChanged(BottomSheetContent newContent); | |
50 } | 64 } |
OLD | NEW |