For #1287 - Create animation for opening and closing tab from home
parent
6a8d0f324e
commit
40f2fe5166
|
@ -19,12 +19,12 @@ import androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.ViewModelProviders
|
import androidx.lifecycle.ViewModelProviders
|
||||||
import androidx.navigation.Navigation
|
import androidx.navigation.Navigation
|
||||||
|
import androidx.transition.TransitionInflater
|
||||||
import com.google.android.material.snackbar.Snackbar
|
import com.google.android.material.snackbar.Snackbar
|
||||||
import kotlinx.android.synthetic.main.component_search.*
|
import kotlinx.android.synthetic.main.component_search.*
|
||||||
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.*
|
||||||
import kotlinx.android.synthetic.main.fragment_search.*
|
import kotlinx.android.synthetic.main.fragment_search.*
|
||||||
import kotlinx.android.synthetic.main.layout_quick_action_sheet.view.*
|
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.Dispatchers.IO
|
import kotlinx.coroutines.Dispatchers.IO
|
||||||
|
@ -116,6 +116,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
postponeEnterTransition()
|
||||||
job = Job()
|
job = Job()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,6 +129,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||||
customTabSessionId = arguments?.getString(IntentProcessor.ACTIVE_SESSION_ID)
|
customTabSessionId = arguments?.getString(IntentProcessor.ACTIVE_SESSION_ID)
|
||||||
|
|
||||||
val view = inflater.inflate(R.layout.fragment_browser, container, false)
|
val view = inflater.inflate(R.layout.fragment_browser, container, false)
|
||||||
|
view.browserLayout.transitionName = "$TAB_ITEM_TRANSITION_NAME${getSessionById()?.id}"
|
||||||
|
|
||||||
toolbarComponent = ToolbarComponent(
|
toolbarComponent = ToolbarComponent(
|
||||||
view.browserLayout,
|
view.browserLayout,
|
||||||
|
@ -179,13 +181,13 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||||
QuickActionViewModel::class.java
|
QuickActionViewModel::class.java
|
||||||
) {
|
) {
|
||||||
QuickActionViewModel(
|
QuickActionViewModel(
|
||||||
QuickActionState(
|
QuickActionState(
|
||||||
readable = getSessionById()?.readerable ?: false,
|
readable = getSessionById()?.readerable ?: false,
|
||||||
bookmarked = findBookmarkedURL(getSessionById()),
|
bookmarked = findBookmarkedURL(getSessionById()),
|
||||||
readerActive = getSessionById()?.readerMode ?: false,
|
readerActive = getSessionById()?.readerMode ?: false,
|
||||||
bounceNeeded = false
|
bounceNeeded = false
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -206,6 +208,15 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
toolbarIntegration.set(
|
||||||
|
feature = (toolbarComponent.uiView as ToolbarUIView).toolbarIntegration,
|
||||||
|
owner = this,
|
||||||
|
view = view
|
||||||
|
)
|
||||||
|
|
||||||
|
sharedElementEnterTransition = TransitionInflater.from(context).inflateTransition(android.R.transition.move)
|
||||||
|
startPostponedEnterTransition()
|
||||||
|
|
||||||
val sessionManager = requireComponents.core.sessionManager
|
val sessionManager = requireComponents.core.sessionManager
|
||||||
|
|
||||||
contextMenuFeature.set(
|
contextMenuFeature.set(
|
||||||
|
@ -268,12 +279,6 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||||
view = view
|
view = view
|
||||||
)
|
)
|
||||||
|
|
||||||
toolbarIntegration.set(
|
|
||||||
feature = (toolbarComponent.uiView as ToolbarUIView).toolbarIntegration,
|
|
||||||
owner = this,
|
|
||||||
view = view
|
|
||||||
)
|
|
||||||
|
|
||||||
val accentHighContrastColor = DefaultThemeManager.resolveAttribute(R.attr.accentHighContrast, requireContext())
|
val accentHighContrastColor = DefaultThemeManager.resolveAttribute(R.attr.accentHighContrast, requireContext())
|
||||||
|
|
||||||
sitePermissionsFeature.set(
|
sitePermissionsFeature.set(
|
||||||
|
@ -771,6 +776,7 @@ class BrowserFragment : Fragment(), BackHandler, CoroutineScope {
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
private const val TAB_ITEM_TRANSITION_NAME = "tab_item"
|
||||||
private const val REQUEST_CODE_DOWNLOAD_PERMISSIONS = 1
|
private const val REQUEST_CODE_DOWNLOAD_PERMISSIONS = 1
|
||||||
private const val REQUEST_CODE_PROMPT_PERMISSIONS = 2
|
private const val REQUEST_CODE_PROMPT_PERMISSIONS = 2
|
||||||
private const val REQUEST_CODE_APP_PERMISSIONS = 3
|
private const val REQUEST_CODE_APP_PERMISSIONS = 3
|
||||||
|
|
|
@ -5,7 +5,10 @@
|
||||||
package org.mozilla.fenix.components.toolbar
|
package org.mozilla.fenix.components.toolbar
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.navigation.NavOptions
|
||||||
import androidx.navigation.Navigation
|
import androidx.navigation.Navigation
|
||||||
|
import androidx.navigation.fragment.FragmentNavigator
|
||||||
import mozilla.components.browser.domains.autocomplete.DomainAutocompleteProvider
|
import mozilla.components.browser.domains.autocomplete.DomainAutocompleteProvider
|
||||||
import mozilla.components.browser.session.SessionManager
|
import mozilla.components.browser.session.SessionManager
|
||||||
import mozilla.components.browser.session.runWithSession
|
import mozilla.components.browser.session.runWithSession
|
||||||
|
@ -19,13 +22,13 @@ import mozilla.components.support.base.feature.LifecycleAwareFeature
|
||||||
import mozilla.components.support.ktx.android.view.hideKeyboard
|
import mozilla.components.support.ktx.android.view.hideKeyboard
|
||||||
import org.mozilla.fenix.DefaultThemeManager
|
import org.mozilla.fenix.DefaultThemeManager
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.browser.BrowserFragmentDirections
|
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.utils.Settings
|
import org.mozilla.fenix.utils.Settings
|
||||||
|
|
||||||
class ToolbarIntegration(
|
class ToolbarIntegration(
|
||||||
context: Context,
|
context: Context,
|
||||||
toolbar: BrowserToolbar,
|
toolbar: BrowserToolbar,
|
||||||
|
browserLayout: ViewGroup,
|
||||||
toolbarMenu: ToolbarMenu,
|
toolbarMenu: ToolbarMenu,
|
||||||
domainAutocompleteProvider: DomainAutocompleteProvider,
|
domainAutocompleteProvider: DomainAutocompleteProvider,
|
||||||
historyStorage: HistoryStorage,
|
historyStorage: HistoryStorage,
|
||||||
|
@ -53,8 +56,18 @@ class ToolbarIntegration(
|
||||||
sessionManager,
|
sessionManager,
|
||||||
{
|
{
|
||||||
toolbar.hideKeyboard()
|
toolbar.hideKeyboard()
|
||||||
|
// We need to dynamically add the options here because if you do it in XML it overwrites
|
||||||
|
val options = NavOptions.Builder().setPopUpTo(R.id.browserFragment, false)
|
||||||
|
.setEnterAnim(R.anim.fade_in).setExitAnim(R.anim.fade_out).build()
|
||||||
|
val extras =
|
||||||
|
FragmentNavigator.Extras.Builder()
|
||||||
|
.addSharedElement(
|
||||||
|
browserLayout,
|
||||||
|
"$TAB_ITEM_TRANSITION_NAME${sessionManager.selectedSession?.id}"
|
||||||
|
)
|
||||||
|
.build()
|
||||||
Navigation.findNavController(toolbar)
|
Navigation.findNavController(toolbar)
|
||||||
.navigate(BrowserFragmentDirections.actionBrowserFragmentToHomeFragment())
|
.navigate(R.id.action_browserFragment_to_homeFragment, null, options, extras)
|
||||||
},
|
},
|
||||||
isPrivate
|
isPrivate
|
||||||
)
|
)
|
||||||
|
@ -74,8 +87,10 @@ class ToolbarIntegration(
|
||||||
toolbar,
|
toolbar,
|
||||||
context.components.core.sessionManager,
|
context.components.core.sessionManager,
|
||||||
sessionId,
|
sessionId,
|
||||||
ToolbarFeature.UrlRenderConfiguration(PublicSuffixList(context),
|
ToolbarFeature.UrlRenderConfiguration(
|
||||||
DefaultThemeManager.resolveAttribute(R.attr.primaryText, context), renderStyle = renderStyle)
|
PublicSuffixList(context),
|
||||||
|
DefaultThemeManager.resolveAttribute(R.attr.primaryText, context), renderStyle = renderStyle
|
||||||
|
)
|
||||||
)
|
)
|
||||||
private var menuPresenter = MenuPresenter(toolbar, context.components.core.sessionManager, sessionId)
|
private var menuPresenter = MenuPresenter(toolbar, context.components.core.sessionManager, sessionId)
|
||||||
|
|
||||||
|
@ -88,4 +103,8 @@ class ToolbarIntegration(
|
||||||
menuPresenter.stop()
|
menuPresenter.stop()
|
||||||
toolbarPresenter.stop()
|
toolbarPresenter.stop()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
private const val TAB_ITEM_TRANSITION_NAME = "tab_item"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -108,6 +108,7 @@ class ToolbarUIView(
|
||||||
toolbarIntegration = ToolbarIntegration(
|
toolbarIntegration = ToolbarIntegration(
|
||||||
this,
|
this,
|
||||||
view,
|
view,
|
||||||
|
container,
|
||||||
menuToolbar,
|
menuToolbar,
|
||||||
ShippedDomainsProvider().also { it.initialize(this) },
|
ShippedDomainsProvider().also { it.initialize(this) },
|
||||||
components.core.historyStorage,
|
components.core.historyStorage,
|
||||||
|
|
|
@ -19,6 +19,8 @@ import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import androidx.lifecycle.ViewModelProviders
|
import androidx.lifecycle.ViewModelProviders
|
||||||
import androidx.navigation.Navigation
|
import androidx.navigation.Navigation
|
||||||
|
import androidx.navigation.fragment.FragmentNavigator
|
||||||
|
import androidx.transition.TransitionInflater
|
||||||
import kotlinx.android.synthetic.main.fragment_home.*
|
import kotlinx.android.synthetic.main.fragment_home.*
|
||||||
import kotlinx.android.synthetic.main.fragment_home.view.*
|
import kotlinx.android.synthetic.main.fragment_home.view.*
|
||||||
import kotlinx.coroutines.CoroutineScope
|
import kotlinx.coroutines.CoroutineScope
|
||||||
|
@ -46,6 +48,7 @@ import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.collections.CreateCollectionViewModel
|
import org.mozilla.fenix.collections.CreateCollectionViewModel
|
||||||
import org.mozilla.fenix.collections.SaveCollectionStep
|
import org.mozilla.fenix.collections.SaveCollectionStep
|
||||||
import org.mozilla.fenix.components.metrics.Event
|
import org.mozilla.fenix.components.metrics.Event
|
||||||
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.allowUndo
|
import org.mozilla.fenix.ext.allowUndo
|
||||||
import org.mozilla.fenix.ext.requireComponents
|
import org.mozilla.fenix.ext.requireComponents
|
||||||
import org.mozilla.fenix.ext.urlToTrimmedHost
|
import org.mozilla.fenix.ext.urlToTrimmedHost
|
||||||
|
@ -96,6 +99,12 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
||||||
override val coroutineContext: CoroutineContext
|
override val coroutineContext: CoroutineContext
|
||||||
get() = Dispatchers.Main + job
|
get() = Dispatchers.Main + job
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
postponeEnterTransition()
|
||||||
|
sharedElementEnterTransition = TransitionInflater.from(context).inflateTransition(android.R.transition.move)
|
||||||
|
}
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
|
@ -156,6 +165,13 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
postponeEnterTransition()
|
||||||
|
sessionControlComponent.view.getViewTreeObserver()
|
||||||
|
.addOnPreDrawListener {
|
||||||
|
startPostponedEnterTransition()
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
view.menuButton.setOnClickListener {
|
view.menuButton.setOnClickListener {
|
||||||
homeMenu?.menuBuilder?.build(requireContext())?.show(
|
homeMenu?.menuBuilder?.build(requireContext())?.show(
|
||||||
anchor = it,
|
anchor = it,
|
||||||
|
@ -285,7 +301,12 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
||||||
val session =
|
val session =
|
||||||
requireComponents.core.sessionManager.findSessionById(action.sessionId)
|
requireComponents.core.sessionManager.findSessionById(action.sessionId)
|
||||||
requireComponents.core.sessionManager.select(session!!)
|
requireComponents.core.sessionManager.select(session!!)
|
||||||
(activity as HomeActivity).openToBrowser(BrowserDirection.FromHome)
|
val directions = HomeFragmentDirections.actionHomeFragmentToBrowserFragment(null)
|
||||||
|
val extras =
|
||||||
|
FragmentNavigator.Extras.Builder()
|
||||||
|
.addSharedElement(action.tabView, "$TAB_ITEM_TRANSITION_NAME${action.sessionId}")
|
||||||
|
.build()
|
||||||
|
Navigation.findNavController(action.tabView).navigate(directions, extras)
|
||||||
}
|
}
|
||||||
is TabAction.Close -> {
|
is TabAction.Close -> {
|
||||||
if (deleteSessionJob == null) removeTabWithUndo(action.sessionId) else {
|
if (deleteSessionJob == null) removeTabWithUndo(action.sessionId) else {
|
||||||
|
@ -401,7 +422,8 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
||||||
(activity as HomeActivity).openToBrowserAndLoad(
|
(activity as HomeActivity).openToBrowserAndLoad(
|
||||||
searchTermOrURL = action.tab.url,
|
searchTermOrURL = action.tab.url,
|
||||||
newTab = true,
|
newTab = true,
|
||||||
from = BrowserDirection.FromHome)
|
from = BrowserDirection.FromHome
|
||||||
|
)
|
||||||
}
|
}
|
||||||
is CollectionAction.OpenTabs -> {
|
is CollectionAction.OpenTabs -> {
|
||||||
invokePendingDeleteJobs()
|
invokePendingDeleteJobs()
|
||||||
|
@ -662,6 +684,7 @@ class HomeFragment : Fragment(), CoroutineScope, AccountObserver {
|
||||||
override fun onProfileUpdated(profile: Profile) { emitAccountChanges() }
|
override fun onProfileUpdated(profile: Profile) { emitAccountChanges() }
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
private const val TAB_ITEM_TRANSITION_NAME = "tab_item"
|
||||||
private const val toolbarPaddingDp = 12f
|
private const val toolbarPaddingDp = 12f
|
||||||
private const val MOTION_LAYOUT_PROGRESS_ROUND_POINT = 0.25f
|
private const val MOTION_LAYOUT_PROGRESS_ROUND_POINT = 0.25f
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,7 @@ package org.mozilla.fenix.home.sessioncontrol
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Bitmap
|
import android.graphics.Bitmap
|
||||||
import android.os.Parcelable
|
import android.os.Parcelable
|
||||||
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import io.reactivex.Observer
|
import io.reactivex.Observer
|
||||||
|
@ -97,7 +98,7 @@ sealed class TabAction : Action {
|
||||||
object Add : TabAction()
|
object Add : TabAction()
|
||||||
object ShareTabs : TabAction()
|
object ShareTabs : TabAction()
|
||||||
data class CloseAll(val private: Boolean) : TabAction()
|
data class CloseAll(val private: Boolean) : TabAction()
|
||||||
data class Select(val sessionId: String) : TabAction()
|
data class Select(val tabView: View, val sessionId: String) : TabAction()
|
||||||
data class Close(val sessionId: String) : TabAction()
|
data class Close(val sessionId: String) : TabAction()
|
||||||
data class Share(val sessionId: String) : TabAction()
|
data class Share(val sessionId: String) : TabAction()
|
||||||
object PrivateBrowsingLearnMore : TabAction()
|
object PrivateBrowsingLearnMore : TabAction()
|
||||||
|
|
|
@ -53,7 +53,7 @@ class TabViewHolder(
|
||||||
|
|
||||||
close_tab_button.increaseTapArea(buttonIncreaseDps)
|
close_tab_button.increaseTapArea(buttonIncreaseDps)
|
||||||
item_tab.setOnClickListener {
|
item_tab.setOnClickListener {
|
||||||
actionEmitter.onNext(TabAction.Select(tab?.sessionId!!))
|
actionEmitter.onNext(TabAction.Select(it, tab?.sessionId!!))
|
||||||
}
|
}
|
||||||
|
|
||||||
item_tab.setOnLongClickListener {
|
item_tab.setOnLongClickListener {
|
||||||
|
@ -85,6 +85,7 @@ class TabViewHolder(
|
||||||
fun bindSession(tab: Tab) {
|
fun bindSession(tab: Tab) {
|
||||||
this.tab = tab
|
this.tab = tab
|
||||||
updateTabUI(tab)
|
updateTabUI(tab)
|
||||||
|
item_tab.transitionName = "$TAB_ITEM_TRANSITION_NAME${tab.sessionId}"
|
||||||
updateSelected(tab.selected ?: false)
|
updateSelected(tab.selected ?: false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,6 +106,7 @@ class TabViewHolder(
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
private const val TAB_ITEM_TRANSITION_NAME = "tab_item"
|
||||||
const val LAYOUT_ID = R.layout.tab_list_row
|
const val LAYOUT_ID = R.layout.tab_list_row
|
||||||
const val buttonIncreaseDps = 12
|
const val buttonIncreaseDps = 12
|
||||||
const val favIconBorderRadiusInPx = 8
|
const val favIconBorderRadiusInPx = 8
|
||||||
|
|
|
@ -3,11 +3,12 @@
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- 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/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/home_component"
|
android:id="@+id/home_component"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
|
android:clipChildren="false"
|
||||||
|
android:clipToPadding="false"
|
||||||
android:padding="16dp"
|
android:padding="16dp"
|
||||||
android:scrollbars="none"
|
android:scrollbars="none"
|
||||||
android:clipToPadding="false" />
|
android:transitionGroup="false" />
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
android:clipToPadding="true"
|
android:clipToPadding="true"
|
||||||
app:behavior_hideable="true"
|
app:behavior_hideable="true"
|
||||||
app:behavior_peekHeight="12dp"
|
app:behavior_peekHeight="12dp"
|
||||||
app:layout_behavior="org.mozilla.fenix.quickactionsheet.QuickActionSheetBehavior"/>
|
app:layout_behavior="org.mozilla.fenix.quickactionsheet.QuickActionSheetBehavior" />
|
||||||
|
|
||||||
<mozilla.components.feature.findinpage.view.FindInPageBar
|
<mozilla.components.feature.findinpage.view.FindInPageBar
|
||||||
android:id="@+id/findInPageView"
|
android:id="@+id/findInPageView"
|
||||||
|
@ -41,11 +41,11 @@
|
||||||
|
|
||||||
<mozilla.components.feature.readerview.view.ReaderViewControlsBar
|
<mozilla.components.feature.readerview.view.ReaderViewControlsBar
|
||||||
android:id="@+id/readerViewControlsBar"
|
android:id="@+id/readerViewControlsBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="bottom"
|
||||||
android:background="?foundation"
|
android:background="?foundation"
|
||||||
android:elevation="24dp"
|
android:elevation="24dp"
|
||||||
android:visibility="gone"
|
android:visibility="gone" />
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="?homeBackground"
|
android:background="?homeBackground"
|
||||||
|
android:clipChildren="false"
|
||||||
app:layoutDescription="@xml/home_scene"
|
app:layoutDescription="@xml/home_scene"
|
||||||
tools:context=".home.HomeFragment">
|
tools:context=".home.HomeFragment">
|
||||||
<ImageButton
|
<ImageButton
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:focusable="true"
|
android:focusable="true"
|
||||||
android:foreground="?android:attr/selectableItemBackground"
|
android:foreground="?android:attr/selectableItemBackground"
|
||||||
|
android:transitionGroup="true"
|
||||||
app:cardBackgroundColor="?above"
|
app:cardBackgroundColor="?above"
|
||||||
app:cardCornerRadius="@dimen/tab_corner_radius"
|
app:cardCornerRadius="@dimen/tab_corner_radius"
|
||||||
app:cardElevation="5dp">
|
app:cardElevation="5dp">
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
app:destination="@id/searchFragment" />
|
app:destination="@id/searchFragment" />
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_homeFragment_to_browserFragment"
|
android:id="@+id/action_homeFragment_to_browserFragment"
|
||||||
app:destination="@id/browserFragment" />
|
app:destination="@id/browserFragment"
|
||||||
|
app:enterAnim="@anim/fade_in"
|
||||||
|
app:exitAnim="@anim/fade_out" />
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_homeFragment_to_libraryFragment"
|
android:id="@+id/action_homeFragment_to_libraryFragment"
|
||||||
app:destination="@id/libraryFragment" />
|
app:destination="@id/libraryFragment" />
|
||||||
|
@ -113,9 +115,7 @@
|
||||||
tools:layout="@layout/fragment_browser">
|
tools:layout="@layout/fragment_browser">
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_browserFragment_to_homeFragment"
|
android:id="@+id/action_browserFragment_to_homeFragment"
|
||||||
app:destination="@id/homeFragment"
|
app:destination="@id/homeFragment" />
|
||||||
app:popUpTo="@+id/nav_graph"
|
|
||||||
app:popUpToInclusive="true" />
|
|
||||||
<action
|
<action
|
||||||
android:id="@+id/action_browserFragment_to_searchFragment"
|
android:id="@+id/action_browserFragment_to_searchFragment"
|
||||||
app:destination="@id/searchFragment" />
|
app:destination="@id/searchFragment" />
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
<style name="NormalThemeBase" parent="Theme.AppCompat.DayNight.NoActionBar">
|
<style name="NormalThemeBase" parent="Theme.AppCompat.DayNight.NoActionBar">
|
||||||
<!-- Android system styling -->
|
<!-- Android system styling -->
|
||||||
|
<item name="android:windowContentTransitions">true</item>
|
||||||
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
|
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
|
||||||
<item name="android:progressBarStyleHorizontal">@style/progressBarStyleHorizontal</item>
|
<item name="android:progressBarStyleHorizontal">@style/progressBarStyleHorizontal</item>
|
||||||
<item name="android:statusBarColor">@color/foundation_normal_theme</item>
|
<item name="android:statusBarColor">@color/foundation_normal_theme</item>
|
||||||
|
@ -58,6 +59,7 @@
|
||||||
|
|
||||||
<style name="PrivateThemeBase" parent="Theme.AppCompat.NoActionBar">
|
<style name="PrivateThemeBase" parent="Theme.AppCompat.NoActionBar">
|
||||||
<!-- Android system styling -->
|
<!-- Android system styling -->
|
||||||
|
<item name="android:windowContentTransitions">true</item>
|
||||||
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
|
<item name="android:windowAnimationStyle">@style/WindowAnimationTransition</item>
|
||||||
<item name="android:progressBarStyleHorizontal">@style/progressBarStyleHorizontal</item>
|
<item name="android:progressBarStyleHorizontal">@style/progressBarStyleHorizontal</item>
|
||||||
<item name="android:statusBarColor">@color/foundation_private_theme</item>
|
<item name="android:statusBarColor">@color/foundation_private_theme</item>
|
||||||
|
|
Loading…
Reference in New Issue