Skip to content

Commit a5e82be

Browse files
author
Rob Orgiu
committed
Update SupportingPane libraries
1 parent 0cecaa9 commit a5e82be

File tree

7 files changed

+31
-26
lines changed

7 files changed

+31
-26
lines changed

.idea/.gitignore

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
*.iml
22
.gradle
33
/local.properties
4-
/.idea/caches
5-
/.idea/libraries
6-
/.idea/modules.xml
7-
/.idea/workspace.xml
8-
/.idea/navEditor.xml
9-
/.idea/assetWizardSettings.xml
104
.DS_Store
115
/build
126
/captures
137
.externalNativeBuild
148
.cxx
159
local.properties
10+
/.idea/*
11+

CanonicalLayouts/supporting-pane-compose/app/build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 The Android Open Source Project
2+
* Copyright 2025 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,7 +17,7 @@
1717
plugins {
1818
id 'com.android.application'
1919
id 'org.jetbrains.kotlin.android'
20-
id("org.jetbrains.kotlin.plugin.compose") version "2.0.20"
20+
id("org.jetbrains.kotlin.plugin.compose") version "2.1.0"
2121

2222
}
2323

@@ -68,19 +68,19 @@ composeCompiler {
6868
}
6969

7070
dependencies {
71-
def composeBom = platform('androidx.compose:compose-bom:2024.11.00')
71+
def composeBom = platform('androidx.compose:compose-bom:2025.01.01')
7272
implementation(composeBom)
7373

7474
implementation 'androidx.core:core-ktx:1.15.0'
7575
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.7'
76-
implementation 'androidx.activity:activity-compose:1.9.3'
76+
implementation 'androidx.activity:activity-compose:1.10.0'
7777
implementation "androidx.compose.ui:ui"
7878
implementation "androidx.compose.ui:ui-tooling-preview"
7979
implementation "androidx.window:window:1.3.0"
80-
implementation 'androidx.compose.material3:material3:1.4.0-alpha04'
81-
implementation 'androidx.compose.material3.adaptive:adaptive:1.1.0-alpha07'
82-
implementation 'androidx.compose.material3.adaptive:adaptive-layout:1.1.0-alpha07'
83-
implementation 'androidx.compose.material3.adaptive:adaptive-navigation:1.1.0-alpha07'
80+
implementation 'androidx.compose.material3:material3:1.4.0-alpha07'
81+
implementation 'androidx.compose.material3.adaptive:adaptive:1.1.0-beta01'
82+
implementation 'androidx.compose.material3.adaptive:adaptive-layout:1.1.0-beta01'
83+
implementation 'androidx.compose.material3.adaptive:adaptive-navigation:1.1.0-beta01'
8484
implementation "androidx.compose.material3:material3-window-size-class:1.3.1"
8585
testImplementation 'junit:junit:4.13.2'
8686
}

CanonicalLayouts/supporting-pane-compose/app/src/main/java/com/example/supportingpanecompose/MainActivity.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 The Android Open Source Project
2+
* Copyright 2025 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,17 +19,21 @@ package com.example.supportingpanecompose
1919
import android.os.Bundle
2020
import androidx.activity.ComponentActivity
2121
import androidx.activity.compose.setContent
22+
import androidx.activity.enableEdgeToEdge
23+
import androidx.compose.foundation.layout.safeDrawingPadding
2224
import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi
25+
import androidx.compose.ui.Modifier
2326
import com.example.supportingpanecompose.ui.SupportingPaneSample
2427
import com.example.supportingpanecompose.ui.theme.SupportingPaneCompose
2528

2629
@OptIn(ExperimentalMaterial3AdaptiveApi::class)
2730
class MainActivity : ComponentActivity() {
2831
override fun onCreate(savedInstanceState: Bundle?) {
2932
super.onCreate(savedInstanceState)
33+
enableEdgeToEdge()
3034
setContent {
3135
SupportingPaneCompose {
32-
SupportingPaneSample()
36+
SupportingPaneSample(modifier = Modifier.safeDrawingPadding())
3337
}
3438
}
3539
}

CanonicalLayouts/supporting-pane-compose/app/src/main/java/com/example/supportingpanecompose/ui/SupportingPaneSample.kt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 The Android Open Source Project
2+
* Copyright 2025 The Android Open Source Project
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@ import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi
3434
import androidx.compose.material3.adaptive.layout.AnimatedPane
3535
import androidx.compose.material3.adaptive.layout.SupportingPaneScaffold
3636
import androidx.compose.material3.adaptive.layout.SupportingPaneScaffoldRole
37+
import androidx.compose.material3.adaptive.layout.defaultDragHandleSemantics
3738
import androidx.compose.material3.adaptive.layout.rememberPaneExpansionState
3839
import androidx.compose.material3.adaptive.navigation.rememberSupportingPaneScaffoldNavigator
3940
import androidx.compose.runtime.Composable
@@ -62,7 +63,7 @@ private val data = mapOf(
6263

6364
@ExperimentalMaterial3AdaptiveApi
6465
@Composable
65-
fun SupportingPaneSample() {
66+
fun SupportingPaneSample(modifier: Modifier = Modifier) {
6667
var selectedTopic: String by rememberSaveable { mutableStateOf(data.keys.first()) }
6768
val navigator = rememberSupportingPaneScaffoldNavigator()
6869
val scope = rememberCoroutineScope()
@@ -76,6 +77,7 @@ fun SupportingPaneSample() {
7677
SupportingPaneScaffold(
7778
directive = navigator.scaffoldDirective,
7879
value = navigator.scaffoldValue,
80+
modifier = modifier,
7981
supportingPane = {
8082
AnimatedPane(
8183
modifier = Modifier.padding(all = 16.dp)
@@ -149,11 +151,11 @@ fun SupportingPaneSample() {
149151
remember { MutableInteractionSource() }
150152
VerticalDragHandle(
151153
modifier =
152-
Modifier.paneExpansionDraggable(
153-
state,
154-
LocalMinimumInteractiveComponentSize.current,
155-
interactionSource
156-
), interactionSource = interactionSource
154+
Modifier.paneExpansionDraggable(
155+
state,
156+
LocalMinimumInteractiveComponentSize.current,
157+
interactionSource, state.defaultDragHandleSemantics()
158+
), interactionSource = interactionSource
157159
)
158160
})
159161
}

CanonicalLayouts/supporting-pane-compose/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616
plugins {
17-
id 'com.android.application' version '8.7.3' apply false
18-
id 'com.android.library' version '8.7.3' apply false
17+
id 'com.android.application' version '8.8.0' apply false
18+
id 'com.android.library' version '8.8.0' apply false
1919
id 'org.jetbrains.kotlin.android' version '2.0.20' apply false
2020
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Wed May 25 14:11:15 UTC 2022
22
distributionBase=GRADLE_USER_HOME
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
44
distributionPath=wrapper/dists
55
zipStorePath=wrapper/dists
66
zipStoreBase=GRADLE_USER_HOME

0 commit comments

Comments
 (0)