Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java

Issue 2738843003: [Home] Add a bottom navigation bar for the BottomSheet (Closed)
Patch Set: Move proguard exception to different file Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java
index 1bf6755621b4903482135918dc862467826676b5..ec653c353e7c19fad7186f711c290f17bbcb091f 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/BottomSheet.java
@@ -446,6 +446,22 @@ public class BottomSheet
}
/**
+ * Gets the minimum offset of the bottom sheet.
+ * @return The min offset.
+ */
+ public float getMinOffset() {
+ return getPeekRatio() * mContainerHeight;
+ }
+
+ /**
+ * Gets the sheet's offset from the bottom of the screen.
+ * @return The sheet's distance from the bottom of the screen.
+ */
+ public float getSheetOffsetFromBottom() {
+ return mContainerHeight - getTranslationY();
+ }
+
+ /**
* Determines if a touch event is inside the toolbar. This assumes the toolbar is the full
* width of the screen and that the toolbar is at the top of the bottom sheet.
* @param e The motion event to test.
@@ -595,22 +611,6 @@ public class BottomSheet
}
/**
- * Gets the minimum offset of the bottom sheet.
- * @return The min offset.
- */
- private float getMinOffset() {
- return getPeekRatio() * mContainerHeight;
- }
-
- /**
- * Gets the sheet's offset from the bottom of the screen.
- * @return The sheet's distance from the bottom of the screen.
- */
- private float getSheetOffsetFromBottom() {
- return mContainerHeight - getTranslationY();
- }
-
- /**
* Sets the sheet's offset relative to the bottom of the screen.
* @param offset The offset that the sheet should be.
*/

Powered by Google App Engine
This is Rietveld 408576698