45 lines
1.6 KiB
Kotlin
45 lines
1.6 KiB
Kotlin
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
||
|
file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||
|
package org.mozilla.fenix.search
|
||
|
|
||
|
import android.os.Bundle
|
||
|
import android.transition.TransitionInflater
|
||
|
import android.view.LayoutInflater
|
||
|
import android.view.View
|
||
|
import android.view.ViewGroup
|
||
|
import androidx.core.content.ContextCompat
|
||
|
import androidx.fragment.app.Fragment
|
||
|
import kotlinx.android.synthetic.main.fragment_search.*
|
||
|
import org.mozilla.fenix.R
|
||
|
|
||
|
class SearchFragment : Fragment() {
|
||
|
override fun onCreateView(
|
||
|
inflater: LayoutInflater, container: ViewGroup?,
|
||
|
savedInstanceState: Bundle?
|
||
|
): View? {
|
||
|
return inflater.inflate(R.layout.fragment_search, container, false)
|
||
|
}
|
||
|
|
||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||
|
super.onCreate(savedInstanceState)
|
||
|
sharedElementEnterTransition = TransitionInflater.from(context).inflateTransition(android.R.transition.move)
|
||
|
}
|
||
|
|
||
|
override fun onResume() {
|
||
|
super.onResume()
|
||
|
toolbar.editMode()
|
||
|
}
|
||
|
|
||
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||
|
super.onViewCreated(view, savedInstanceState)
|
||
|
toolbar_wrapper.clipToOutline = false
|
||
|
toolbar.apply {
|
||
|
textColor = ContextCompat.getColor(context, R.color.searchText)
|
||
|
textSize = 14f
|
||
|
hint = context.getString(R.string.search_hint)
|
||
|
hintColor = ContextCompat.getColor(context, R.color.searchText)
|
||
|
}
|
||
|
}
|
||
|
}
|