parent
84afb5d156
commit
28f58eb025
|
@ -10,7 +10,6 @@ import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
import androidx.transition.TransitionInflater
|
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import kotlinx.android.synthetic.main.fragment_browser.*
|
import kotlinx.android.synthetic.main.fragment_browser.*
|
||||||
import kotlinx.android.synthetic.main.fragment_browser.view.*
|
import kotlinx.android.synthetic.main.fragment_browser.view.*
|
||||||
|
@ -48,16 +47,6 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
|
||||||
private val windowFeature = ViewBoundFeatureWrapper<WindowFeature>()
|
private val windowFeature = ViewBoundFeatureWrapper<WindowFeature>()
|
||||||
private val searchFeature = ViewBoundFeatureWrapper<SearchFeature>()
|
private val searchFeature = ViewBoundFeatureWrapper<SearchFeature>()
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
postponeEnterTransition()
|
|
||||||
sharedElementEnterTransition =
|
|
||||||
TransitionInflater.from(context).inflateTransition(android.R.transition.move)
|
|
||||||
.setDuration(
|
|
||||||
SHARED_TRANSITION_MS
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
|
|
|
@ -33,7 +33,6 @@ import androidx.lifecycle.Observer
|
||||||
import androidx.lifecycle.OnLifecycleEvent
|
import androidx.lifecycle.OnLifecycleEvent
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.navigation.fragment.FragmentNavigator
|
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
@ -544,11 +543,7 @@ class HomeFragment : Fragment() {
|
||||||
sessionId = null
|
sessionId = null
|
||||||
)
|
)
|
||||||
|
|
||||||
val extras = FragmentNavigator.Extras.Builder()
|
nav(R.id.homeFragment, directions)
|
||||||
.addSharedElement(toolbar_wrapper, "toolbar_wrapper_transition")
|
|
||||||
.build()
|
|
||||||
|
|
||||||
nav(R.id.homeFragment, directions, extras)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun openSettingsScreen() {
|
private fun openSettingsScreen() {
|
||||||
|
|
|
@ -21,7 +21,6 @@ import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.lifecycleScope
|
import androidx.lifecycle.lifecycleScope
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import androidx.navigation.fragment.navArgs
|
import androidx.navigation.fragment.navArgs
|
||||||
import androidx.transition.TransitionInflater
|
|
||||||
import kotlinx.android.synthetic.main.fragment_search.*
|
import kotlinx.android.synthetic.main.fragment_search.*
|
||||||
import kotlinx.android.synthetic.main.fragment_search.view.*
|
import kotlinx.android.synthetic.main.fragment_search.view.*
|
||||||
import kotlinx.android.synthetic.main.search_suggestions_onboarding.view.*
|
import kotlinx.android.synthetic.main.search_suggestions_onboarding.view.*
|
||||||
|
@ -57,17 +56,6 @@ class SearchFragment : Fragment(), UserInteractionHandler {
|
||||||
private lateinit var searchStore: SearchFragmentStore
|
private lateinit var searchStore: SearchFragmentStore
|
||||||
private lateinit var searchInteractor: SearchInteractor
|
private lateinit var searchInteractor: SearchInteractor
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
postponeEnterTransition()
|
|
||||||
|
|
||||||
sharedElementEnterTransition =
|
|
||||||
TransitionInflater.from(context).inflateTransition(android.R.transition.move)
|
|
||||||
.setDuration(SHARED_TRANSITION_MS)
|
|
||||||
|
|
||||||
requireComponents.analytics.metrics.track(Event.InteractWithSearchURLArea)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
|
@ -87,6 +75,8 @@ class SearchFragment : Fragment(), UserInteractionHandler {
|
||||||
|
|
||||||
val isPrivate = (activity as HomeActivity).browsingModeManager.mode.isPrivate
|
val isPrivate = (activity as HomeActivity).browsingModeManager.mode.isPrivate
|
||||||
|
|
||||||
|
requireComponents.analytics.metrics.track(Event.InteractWithSearchURLArea)
|
||||||
|
|
||||||
val showSearchSuggestions =
|
val showSearchSuggestions =
|
||||||
if (isPrivate) {
|
if (isPrivate) {
|
||||||
requireContext().settings().shouldShowSearchSuggestions &&
|
requireContext().settings().shouldShowSearchSuggestions &&
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
<alpha
|
<alpha
|
||||||
android:interpolator="@android:interpolator/decelerate_quad"
|
android:interpolator="@android:interpolator/decelerate_quad"
|
||||||
android:fromAlpha="0" android:toAlpha="1"
|
android:fromAlpha="0" android:toAlpha="1"
|
||||||
android:duration="125" />
|
android:duration="150" />
|
||||||
<translate
|
<translate
|
||||||
android:interpolator="@android:interpolator/decelerate_quad"
|
android:interpolator="@android:interpolator/decelerate_quad"
|
||||||
android:fromYDelta="7%" android:toYDelta="0%"
|
android:fromYDelta="7%" android:toYDelta="0%"
|
||||||
android:duration="125"/>
|
android:duration="150"/>
|
||||||
</set>
|
</set>
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
android:background="@drawable/toolbar_background_top"
|
android:background="@drawable/toolbar_background_top"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:transitionName="toolbar_wrapper_transition"
|
|
||||||
android:focusableInTouchMode="true"
|
android:focusableInTouchMode="true"
|
||||||
app:layout_scrollFlags="scroll|enterAlways|snap|exitUntilCollapsed"
|
app:layout_scrollFlags="scroll|enterAlways|snap|exitUntilCollapsed"
|
||||||
app:browserToolbarClearColor="?primaryText"
|
app:browserToolbarClearColor="?primaryText"
|
||||||
|
|
|
@ -120,7 +120,6 @@
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
android:contentDescription="@string/search_hint"
|
android:contentDescription="@string/search_hint"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:transitionName="toolbar_wrapper_transition"
|
|
||||||
app:layout_constraintBottom_toBottomOf="@id/bottom_bar"
|
app:layout_constraintBottom_toBottomOf="@id/bottom_bar"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/add_tab_button"
|
app:layout_constraintEnd_toStartOf="@+id/add_tab_button"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
android:layout_height="@dimen/browser_toolbar_height"
|
android:layout_height="@dimen/browser_toolbar_height"
|
||||||
android:layout_margin="0dp"
|
android:layout_margin="0dp"
|
||||||
android:outlineProvider="paddedBounds"
|
android:outlineProvider="paddedBounds"
|
||||||
android:transitionName="toolbar_wrapper_transition"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
|
@ -69,10 +69,8 @@
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_homeFragment_to_searchFragment"
|
android:id="@+id/action_homeFragment_to_searchFragment"
|
||||||
app:destination="@id/searchFragment"
|
app:destination="@id/searchFragment"
|
||||||
app:enterAnim="@anim/fade_in"
|
app:enterAnim="@anim/fade_in_up"
|
||||||
app:exitAnim="@anim/fade_out"
|
app:popExitAnim="@anim/fade_out_down" />
|
||||||
app:popEnterAnim="@anim/fade_in"
|
|
||||||
app:popExitAnim="@anim/fade_out" />
|
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_homeFragment_to_browserFragment"
|
android:id="@+id/action_homeFragment_to_browserFragment"
|
||||||
app:destination="@id/browserFragment"
|
app:destination="@id/browserFragment"
|
||||||
|
|
Loading…
Reference in New Issue