For #7250 - Replace anko.dimen
parent
e789d8ebe3
commit
562eb89356
|
@ -28,7 +28,6 @@ import mozilla.components.feature.tabs.WindowFeature
|
||||||
import mozilla.components.lib.state.ext.consumeFrom
|
import mozilla.components.lib.state.ext.consumeFrom
|
||||||
import mozilla.components.support.base.feature.UserInteractionHandler
|
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||||
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
import mozilla.components.support.base.feature.ViewBoundFeatureWrapper
|
||||||
import org.jetbrains.anko.dimen
|
|
||||||
import org.mozilla.fenix.HomeActivity
|
import org.mozilla.fenix.HomeActivity
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.FenixSnackbar
|
import org.mozilla.fenix.components.FenixSnackbar
|
||||||
|
@ -129,7 +128,7 @@ class BrowserFragment : BaseBrowserFragment(), UserInteractionHandler {
|
||||||
val browserEngine = swipeRefresh.layoutParams as CoordinatorLayout.LayoutParams
|
val browserEngine = swipeRefresh.layoutParams as CoordinatorLayout.LayoutParams
|
||||||
|
|
||||||
browserEngine.bottomMargin = if (requireContext().settings().shouldUseBottomToolbar) {
|
browserEngine.bottomMargin = if (requireContext().settings().shouldUseBottomToolbar) {
|
||||||
requireContext().dimen(R.dimen.browser_toolbar_height)
|
requireContext().resources.getDimensionPixelSize(R.dimen.browser_toolbar_height)
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,6 @@ import mozilla.components.browser.session.Session
|
||||||
import mozilla.components.browser.toolbar.BrowserToolbar
|
import mozilla.components.browser.toolbar.BrowserToolbar
|
||||||
import mozilla.components.browser.toolbar.display.DisplayToolbar
|
import mozilla.components.browser.toolbar.display.DisplayToolbar
|
||||||
import mozilla.components.support.ktx.android.util.dpToFloat
|
import mozilla.components.support.ktx.android.util.dpToFloat
|
||||||
import org.jetbrains.anko.dimen
|
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
import org.mozilla.fenix.components.FenixSnackbar
|
import org.mozilla.fenix.components.FenixSnackbar
|
||||||
import org.mozilla.fenix.customtabs.CustomTabToolbarIntegration
|
import org.mozilla.fenix.customtabs.CustomTabToolbarIntegration
|
||||||
|
@ -78,14 +77,14 @@ class BrowserToolbarView(
|
||||||
val popupWindow = PopupWindow(
|
val popupWindow = PopupWindow(
|
||||||
customView,
|
customView,
|
||||||
LinearLayout.LayoutParams.WRAP_CONTENT,
|
LinearLayout.LayoutParams.WRAP_CONTENT,
|
||||||
view.context.dimen(R.dimen.context_menu_height),
|
view.context.resources.getDimensionPixelSize(R.dimen.context_menu_height),
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
|
|
||||||
val selectedSession = container.context.components.core.sessionManager.selectedSession
|
val selectedSession = container.context.components.core.sessionManager.selectedSession
|
||||||
|
|
||||||
popupWindow.elevation =
|
popupWindow.elevation =
|
||||||
view.context.dimen(R.dimen.mozac_browser_menu_elevation).toFloat()
|
view.context.resources.getDimension(R.dimen.mozac_browser_menu_elevation)
|
||||||
|
|
||||||
customView.paste.isVisible = !clipboard.text.isNullOrEmpty() && !isCustomTabSession
|
customView.paste.isVisible = !clipboard.text.isNullOrEmpty() && !isCustomTabSession
|
||||||
customView.paste_and_go.isVisible =
|
customView.paste_and_go.isVisible =
|
||||||
|
@ -117,7 +116,7 @@ class BrowserToolbarView(
|
||||||
|
|
||||||
popupWindow.showAsDropDown(
|
popupWindow.showAsDropDown(
|
||||||
view,
|
view,
|
||||||
view.context.dimen(R.dimen.context_menu_x_offset),
|
view.context.resources.getDimensionPixelSize(R.dimen.context_menu_x_offset),
|
||||||
0,
|
0,
|
||||||
Gravity.START
|
Gravity.START
|
||||||
)
|
)
|
||||||
|
|
|
@ -24,7 +24,6 @@ import mozilla.components.browser.search.SearchEngineManager
|
||||||
import mozilla.components.support.base.log.Log
|
import mozilla.components.support.base.log.Log
|
||||||
import mozilla.components.support.base.log.Log.Priority.WARN
|
import mozilla.components.support.base.log.Log.Priority.WARN
|
||||||
import mozilla.components.support.ktx.android.content.getColorFromAttr
|
import mozilla.components.support.ktx.android.content.getColorFromAttr
|
||||||
import org.jetbrains.anko.dimen
|
|
||||||
import org.jetbrains.anko.px2dip
|
import org.jetbrains.anko.px2dip
|
||||||
import org.mozilla.fenix.BuildConfig
|
import org.mozilla.fenix.BuildConfig
|
||||||
import org.mozilla.fenix.Config
|
import org.mozilla.fenix.Config
|
||||||
|
@ -114,4 +113,4 @@ fun Context.settings(isCrashReportEnabledInBuild: Boolean = BuildConfig.CRASH_RE
|
||||||
Settings.getInstance(this, isCrashReportEnabledInBuild)
|
Settings.getInstance(this, isCrashReportEnabledInBuild)
|
||||||
|
|
||||||
fun Context.getDimenInDip(@DimenRes resource: Int) =
|
fun Context.getDimenInDip(@DimenRes resource: Int) =
|
||||||
this.px2dip(this.dimen(resource))
|
this.px2dip(this.resources.getDimensionPixelSize(resource))
|
||||||
|
|
Loading…
Reference in New Issue