Commit 9a4b66b2 authored by Mygod's avatar Mygod

Add shadow to minidrawer

parent 2d8257d3
......@@ -218,6 +218,11 @@ class MainActivity extends Activity with ServiceBoundContext with Drawer.OnDrawe
.withSecond(drawer.getMiniDrawer.build(this), miniDrawerWidth.toInt)
.withSavedInstance(savedInstanceState)
.build()
if (getResources.getConfiguration.getLayoutDirection == View.LAYOUT_DIRECTION_RTL)
crossfader.getCrossFadeSlidingPaneLayout.setShadowDrawableRight(
AppCompatResources.getDrawable(this, R.drawable.material_drawer_shadow_right))
else crossfader.getCrossFadeSlidingPaneLayout.setShadowDrawableLeft(
AppCompatResources.getDrawable(this, R.drawable.material_drawer_shadow_left))
drawer.getMiniDrawer.withCrossFader(new ICrossfader { // a wrapper is needed
def isCrossfaded: Boolean = crossfader.isCrossFaded
def crossfade(): Unit = crossfader.crossFade()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment