1
0
Fork 0

For #11708 - Remove setMargins in CustomTabsIntegration

master
ekager 2020-06-18 15:03:33 -04:00 committed by Emily Kager
parent 82cbafabaf
commit df63c5a4bc
2 changed files with 0 additions and 12 deletions

View File

@ -5,8 +5,6 @@
package org.mozilla.fenix.customtabs package org.mozilla.fenix.customtabs
import android.app.Activity import android.app.Activity
import android.view.View
import android.view.ViewGroup
import androidx.appcompat.content.res.AppCompatResources import androidx.appcompat.content.res.AppCompatResources
import mozilla.components.browser.session.SessionManager import mozilla.components.browser.session.SessionManager
import mozilla.components.browser.toolbar.BrowserToolbar import mozilla.components.browser.toolbar.BrowserToolbar
@ -23,7 +21,6 @@ class CustomTabsIntegration(
toolbar: BrowserToolbar, toolbar: BrowserToolbar,
sessionId: String, sessionId: String,
activity: Activity, activity: Activity,
engineLayout: View,
onItemTapped: (ToolbarMenu.Item) -> Unit = {}, onItemTapped: (ToolbarMenu.Item) -> Unit = {},
shouldReverseItems: Boolean, shouldReverseItems: Boolean,
isPrivate: Boolean isPrivate: Boolean
@ -33,14 +30,6 @@ class CustomTabsIntegration(
// Remove toolbar shadow // Remove toolbar shadow
toolbar.elevation = 0f toolbar.elevation = 0f
// Reduce margin height of EngineView from the top for the toolbar
engineLayout.run {
(layoutParams as ViewGroup.MarginLayoutParams).apply {
val toolbarHeight = resources.getDimension(R.dimen.browser_toolbar_height).toInt()
setMargins(0, toolbarHeight, 0, 0)
}
}
val uncoloredEtpShield = AppCompatResources.getDrawable( val uncoloredEtpShield = AppCompatResources.getDrawable(
activity, activity,
R.drawable.ic_tracking_protection_enabled R.drawable.ic_tracking_protection_enabled

View File

@ -66,7 +66,6 @@ class ExternalAppBrowserFragment : BaseBrowserFragment(), UserInteractionHandler
toolbar = toolbar, toolbar = toolbar,
sessionId = customTabSessionId, sessionId = customTabSessionId,
activity = activity, activity = activity,
engineLayout = view.swipeRefresh,
onItemTapped = { browserInteractor.onBrowserToolbarMenuItemTapped(it) }, onItemTapped = { browserInteractor.onBrowserToolbarMenuItemTapped(it) },
isPrivate = it.private, isPrivate = it.private,
shouldReverseItems = !activity.settings().shouldUseBottomToolbar shouldReverseItems = !activity.settings().shouldUseBottomToolbar