fix: don't stretch the full-screen pull-down grabber across the whole width
A vertical LinearLayout defaults its children to MATCH_PARENT width, so the collapsed grabber chip's rounded background spanned the entire screen. Give the grabber explicit WRAP_CONTENT layout params (centered) so only the chip shows. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MgMpRcWj6y82LxLiwcuzmN
This commit is contained in:
+6
@@ -222,6 +222,12 @@ class NappletControlSheet(
|
||||
return LinearLayout(context).apply {
|
||||
orientation = VERTICAL
|
||||
gravity = Gravity.CENTER_HORIZONTAL
|
||||
// Wrap the grabber (a vertical LinearLayout defaults its children to MATCH_PARENT width, which
|
||||
// would stretch this chip's background across the whole screen) and center it under the parent.
|
||||
layoutParams =
|
||||
LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT).apply {
|
||||
gravity = Gravity.CENTER_HORIZONTAL
|
||||
}
|
||||
setPadding(dp(16), dp(7), dp(16), dp(7))
|
||||
background =
|
||||
GradientDrawable().apply {
|
||||
|
||||
Reference in New Issue
Block a user