|
|
|
@ -12,6 +12,7 @@ import android.graphics.Typeface.ITALIC
|
|
|
|
|
import android.os.Bundle
|
|
|
|
|
import android.text.style.StyleSpan
|
|
|
|
|
import android.view.LayoutInflater
|
|
|
|
|
import android.view.MotionEvent
|
|
|
|
|
import android.view.View
|
|
|
|
|
import android.view.ViewGroup
|
|
|
|
|
import android.view.ViewStub
|
|
|
|
@ -33,6 +34,7 @@ import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
|
|
|
|
import mozilla.components.support.ktx.android.content.getColorFromAttr
|
|
|
|
|
import mozilla.components.support.ktx.android.content.hasCamera
|
|
|
|
|
import mozilla.components.support.ktx.android.content.isPermissionGranted
|
|
|
|
|
import mozilla.components.support.ktx.android.view.hideKeyboard
|
|
|
|
|
import mozilla.components.ui.autocomplete.InlineAutocompleteEditText
|
|
|
|
|
import org.mozilla.fenix.BrowserDirection
|
|
|
|
|
import org.mozilla.fenix.HomeActivity
|
|
|
|
@ -57,6 +59,7 @@ class SearchFragment : Fragment(), UserInteractionHandler {
|
|
|
|
|
private lateinit var searchStore: SearchFragmentStore
|
|
|
|
|
private lateinit var searchInteractor: SearchInteractor
|
|
|
|
|
|
|
|
|
|
@Suppress("LongMethod")
|
|
|
|
|
override fun onCreateView(
|
|
|
|
|
inflater: LayoutInflater,
|
|
|
|
|
container: ViewGroup?,
|
|
|
|
@ -119,6 +122,14 @@ class SearchFragment : Fragment(), UserInteractionHandler {
|
|
|
|
|
|
|
|
|
|
awesomeBarView = AwesomeBarView(view.scrollable_area, searchInteractor)
|
|
|
|
|
|
|
|
|
|
view.scrollView.setOnTouchListener { _, event ->
|
|
|
|
|
when (event?.action) {
|
|
|
|
|
MotionEvent.ACTION_SCROLL, MotionEvent.ACTION_MOVE -> {
|
|
|
|
|
view.hideKeyboard()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
false
|
|
|
|
|
}
|
|
|
|
|
toolbarView = ToolbarView(
|
|
|
|
|
view.toolbar_component_wrapper,
|
|
|
|
|
searchInteractor,
|
|
|
|
|