|
|
|
@ -52,7 +52,9 @@ class FindInPageIntegration(
|
|
|
|
|
|
|
|
|
|
private fun launch() {
|
|
|
|
|
sessionManager.runWithSessionIdOrSelected(sessionId) {
|
|
|
|
|
toolbar.visibility = View.GONE
|
|
|
|
|
if (!it.isCustomTabSession()) {
|
|
|
|
|
toolbar.visibility = View.GONE
|
|
|
|
|
}
|
|
|
|
|
view.asView().visibility = View.VISIBLE
|
|
|
|
|
feature.bind(it)
|
|
|
|
|
}
|
|
|
|
@ -77,7 +79,11 @@ class FindInPageBarBehavior(
|
|
|
|
|
context: Context,
|
|
|
|
|
attrs: AttributeSet
|
|
|
|
|
) : CoordinatorLayout.Behavior<FindInPageBar>(context, attrs) {
|
|
|
|
|
override fun layoutDependsOn(parent: CoordinatorLayout, child: FindInPageBar, dependency: View): Boolean {
|
|
|
|
|
override fun layoutDependsOn(
|
|
|
|
|
parent: CoordinatorLayout,
|
|
|
|
|
child: FindInPageBar,
|
|
|
|
|
dependency: View
|
|
|
|
|
): Boolean {
|
|
|
|
|
if (dependency is BrowserToolbar) {
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
@ -85,7 +91,11 @@ class FindInPageBarBehavior(
|
|
|
|
|
return super.layoutDependsOn(parent, child, dependency)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
override fun onDependentViewChanged(parent: CoordinatorLayout, child: FindInPageBar, dependency: View): Boolean {
|
|
|
|
|
override fun onDependentViewChanged(
|
|
|
|
|
parent: CoordinatorLayout,
|
|
|
|
|
child: FindInPageBar,
|
|
|
|
|
dependency: View
|
|
|
|
|
): Boolean {
|
|
|
|
|
return if (dependency is BrowserToolbar) {
|
|
|
|
|
repositionFindInPageBar(child, dependency)
|
|
|
|
|
true
|
|
|
|
|