From 0a449dc12c47a5db69bf63b6ab904613c5e4a5f4 Mon Sep 17 00:00:00 2001 From: Sawyer Blatz Date: Thu, 21 Mar 2019 07:58:24 -0700 Subject: [PATCH] For #1072: Adds onAttachedToWindow --- app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt | 2 +- .../org/mozilla/fenix/quickactionsheet/QuickActionSheet.kt | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt index 2c3df9cdf4..a075397465 100644 --- a/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt +++ b/app/src/main/java/org/mozilla/fenix/browser/BrowserFragment.kt @@ -210,7 +210,7 @@ class BrowserFragment : Fragment(), BackHandler { ) val actionSheet = view.findViewById(R.id.quick_action_sheet) - actionSheet.afterInflate() + //actionSheet.afterInflate() val actionEmitter = ActionBusFactory.get(this).getManagedEmitter(SearchAction::class.java) sessionId?.let { id -> diff --git a/app/src/main/java/org/mozilla/fenix/quickactionsheet/QuickActionSheet.kt b/app/src/main/java/org/mozilla/fenix/quickactionsheet/QuickActionSheet.kt index 996eadd919..5630791e3e 100644 --- a/app/src/main/java/org/mozilla/fenix/quickactionsheet/QuickActionSheet.kt +++ b/app/src/main/java/org/mozilla/fenix/quickactionsheet/QuickActionSheet.kt @@ -31,7 +31,8 @@ class QuickActionSheet @JvmOverloads constructor( inflate(getContext(), R.layout.layout_quick_action_sheet, this) } - fun afterInflate() { + override fun onAttachedToWindow() { + super.onAttachedToWindow() setupHandle() }