Update material design components (#587)

This commit is contained in:
Rafał Borcz
2019-11-10 16:45:53 +01:00
committed by Mikołaj Pich
parent c708b0c20e
commit 2f18d42c86
15 changed files with 19 additions and 22 deletions

View File

@ -100,7 +100,7 @@ class MainActivity : BaseActivity<MainPresenter>(), MainView {
override fun initView() {
with(mainToolbar) {
if (SDK_INT >= LOLLIPOP) stateListAnimator = null
setBackgroundColor(overlayProvider.get().getSurfaceColorWithOverlayIfNeeded(dpToPx(4f)))
setBackgroundColor(overlayProvider.get().compositeOverlayWithThemeSurfaceColorIfNeeded(dpToPx(4f)))
}
with(mainBottomNav) {
@ -113,7 +113,7 @@ class MainActivity : BaseActivity<MainPresenter>(), MainView {
))
accentColor = getThemeAttrColor(R.attr.colorPrimary)
inactiveColor = ColorUtils.setAlphaComponent(getThemeAttrColor(R.attr.colorOnSurface), 153)
defaultBackgroundColor = overlayProvider.get().getSurfaceColorWithOverlayIfNeeded(dpToPx(8f))
defaultBackgroundColor = overlayProvider.get().compositeOverlayWithThemeSurfaceColorIfNeeded(dpToPx(8f))
titleState = ALWAYS_SHOW
currentItem = startMenuIndex
isBehaviorTranslationEnabled = false

View File

@ -33,7 +33,7 @@ class MaterialLinearLayout : LinearLayout {
if (SDK_INT >= LOLLIPOP) {
setElevation(elevation)
} else {
setBackgroundColor(ElevationOverlayProvider(context).getSurfaceColorWithOverlayIfNeeded(elevation))
setBackgroundColor(ElevationOverlayProvider(context).compositeOverlayWithThemeSurfaceColorIfNeeded(elevation))
}
}
}

View File

@ -19,7 +19,7 @@ open class MaterialTabLayout : TabLayout {
if (SDK_INT >= LOLLIPOP) {
setElevation(elevation)
} else {
setBackgroundColor(ElevationOverlayProvider(context).getSurfaceColorWithOverlayIfNeeded(elevation))
setBackgroundColor(ElevationOverlayProvider(context).compositeOverlayWithThemeSurfaceColorIfNeeded(elevation))
}
}
}