Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions views/src/main/java/insets/SystemBarProtectionSnippet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@ class SystemBarProtectionSnippet : AppCompatActivity() {
insets
}

// [START android_system_bar_protection_kotlin]
val red = 52
val green = 168
val blue = 83
val paneBackgroundColor = Color.rgb(red, green, blue)
// [START android_system_bar_protection_kotlin]
findViewById<ProtectionLayout>(R.id.list_protection)
.setProtections(
listOf(
GradientProtection(
WindowInsetsCompat.Side.TOP,
// Ideally, this is the pane's background color
// alpha = 204 for an 80% gradient
Color.argb(204, red, green, blue)
paneBackgroundColor
)
)
)
Expand Down