Skip to content

Commit

Permalink
radius recalculate
Browse files Browse the repository at this point in the history
  • Loading branch information
shiburagi committed Jul 18, 2020
1 parent 82ac04c commit 9c62b7a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import androidx.drawerlayout.widget.DrawerLayout
import com.google.android.material.navigation.NavigationView
import com.google.android.material.shape.MaterialShapeDrawable
import java.util.*
import kotlin.math.floor
import kotlin.math.round

/**
* Created by Shiburagi on 21/09/2017.
Expand Down Expand Up @@ -225,7 +227,7 @@ open class AdvanceDrawerLayout : DrawerLayout {
}
}
}
child.radius = setting.radius * slideOffset
child.radius = (round((setting.radius * slideOffset) * 2.0) / 2).toFloat()
super.setScrimColor(setting.scrimColor)
super.setDrawerElevation(setting.drawerElevation)
val percentage = 1f - setting.percentage
Expand Down

0 comments on commit 9c62b7a

Please sign in to comment.