Fixed
Status Update
Comments
an...@google.com <an...@google.com>
ap...@google.com <ap...@google.com> #2
I used this before.
@OptIn(ExperimentalMaterialApi::class)
val BottomSheetScaffoldState.currentFraction: Float
get() {
val fraction = bottomSheetState.progress.fraction
val targetValue = bottomSheetState.targetValue
val currentValue = bottomSheetState.currentValue
return when {
currentValue == Collapsed && targetValue == Collapsed -> 0f
currentValue == Expanded && targetValue == Expanded -> 1f
currentValue == Collapsed && targetValue == Expanded -> fraction
else -> 1f - fraction
}
}
from
But the fraction
and targetValue
are not available in newer material lib version.
So I changed to the solution provided by #1, and observed the same behavior.
The requirement is simple: to have a value between 0 (collapsed) <-> 1 (expanded).
It'll be good if the lib provides this value then we don't have to calculate by self.
Description
In our company we are using an app theme that is derived from MaterialUI, so the Material components fit very well as a starting off point.
Unfortunately our design specs specify that OutlinedTextField in non-focused state should have an outline border thickness of 2dp. In the code this outline border thickness is hardcoded in a private variable, permanently set to 1dp.
I did not find any way to change it, although with the old Android style XML Material UI components styling the border thickness of outlined TextFields is possible.
I could open a PR to address the issue if required.