Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
62c99ae
Update workflow to use JDK 17
alexvanyo Jan 16, 2024
d3796bd
Merge pull request #454 from android/av/jdk-17
alexvanyo Jan 18, 2024
114ad7c
Update versions
alexvanyo Jan 12, 2024
3439384
Add expandable pane to list-detail-compose
alexvanyo Jan 12, 2024
15e9ce1
Replace onSizeChanged with layout
alexvanyo Jan 16, 2024
3695771
Merge pull request #453 from android/av/list-detail-compose-expandabl…
alexvanyo Jan 18, 2024
b1bf921
Update AGP and Gradle
Jan 23, 2024
f3705eb
Update dependencies
Jan 23, 2024
b7f0d36
Update Gradle and Gradle Wrapper
Jan 23, 2024
c7a088c
Add Supporting Pane Material 3 implementation
Jan 23, 2024
36bb4ce
Remove old implementation of Supporting Pane
Jan 23, 2024
ac21f12
Update AGP and Gradle
Jan 23, 2024
a0652e0
Update dependencies
Jan 23, 2024
546cd16
Update Gradle and Gradle Wrapper
Jan 23, 2024
c4c298c
Add Supporting Pane Material 3 implementation
Jan 23, 2024
50b989c
Remove old implementation of Supporting Pane
Jan 23, 2024
69952d5
Merge remote-tracking branch 'origin/ro_adaptive_support_pane' into r…
Jan 23, 2024
a044426
Update dependencies
Jan 30, 2024
750efce
Move scaffoldState as first parameter
Jan 30, 2024
31b3f6f
Move strings to their own resource identifier
Jan 30, 2024
e6eb1e1
Remove background which causes visual oddity
Jan 30, 2024
e2856b0
Move BackHandler to top of the declaration
Jan 30, 2024
e4a1f30
Merge pull request #456 from tiwiz/ro_adaptive_support_pane
tiwiz Feb 19, 2024
428cefa
Update Supporting Pane to alpha 09
Mar 26, 2024
a6c8106
Update List-Detail sample to Material 3 Adaptive
Mar 26, 2024
181ebfa
Merge pull request #459 from tiwiz/ro_supporting_pane_alpha09
tiwiz Mar 29, 2024
1261217
Fix suggestion from alexvanyo
Apr 11, 2024
a14e648
Merge pull request #460 from tiwiz/ro_list_detail_alpha09
tiwiz Apr 19, 2024
cdd52d2
Updates ActivityEmbedding and add Espresso initial tests
Jul 8, 2024
a57e661
Merge pull request #471 from tiwiz/ae-focus-test
tiwiz Jul 18, 2024
242cc58
Update project to Material Adaptive Library 3 v 1.1.0-alpha01
Sep 2, 2024
9212e1c
Restore AnimatedContent
Sep 2, 2024
0a4dc5f
Update Supporting Pane to 1.1.0 alpha 01
Sep 2, 2024
11692f8
Update Supporting Pane to Kotlin 2
Sep 2, 2024
d4da2b4
Update ListDetails to Kotlin 2.0
Sep 2, 2024
a62577d
Update Feed to Kotlin 2
Sep 2, 2024
87ea932
Update ActivityEmbedding to Kotlin 2.0
Sep 3, 2024
9e1d1e7
Update Feed View to Kotlin 2.0
Sep 3, 2024
35df545
Update SlidingPane to Kotlin 2.0
Sep 3, 2024
f5777da
Update Supporting Pane to Kotlin 2.0
Sep 3, 2024
697a6b4
Update SlidingPane to Kotlin 2.0
Sep 3, 2024
90f5cf9
Update Feed View to Kotlin 2.0
Sep 3, 2024
46417e2
Update Supporting Pane to Kotlin 2.0
Sep 3, 2024
ba5d63f
Fix comments
Sep 4, 2024
03d0a48
Merge branch 'refs/heads/material-1.1.0-alpha01' into Kotlin-2.0
Sep 4, 2024
f1b6f2c
Fix comments
Sep 5, 2024
eaeb3c3
Merge branch 'refs/heads/material-1.1.0-alpha01' into Kotlin-2.0
Sep 5, 2024
288fdc9
Update CanonicalLayouts/list-detail-compose/app/src/main/java/com/exa…
tiwiz Sep 5, 2024
9563675
Fix comments
Sep 5, 2024
2284ca3
Fix comments
Sep 5, 2024
9b16e3c
Merge remote-tracking branch 'origin/material-1.1.0-alpha01' into mat…
Sep 5, 2024
5b7b9d0
Merge branch 'refs/heads/material-1.1.0-alpha01' into Kotlin-2.0
Sep 5, 2024
fe89cf6
Update CanonicalLayouts/list-detail-compose/app/src/main/java/com/exa…
tiwiz Sep 6, 2024
3ca647a
Update Android CI Workflow
tiwiz Sep 10, 2024
3295ad6
Update libraries to avoid deprecation
tiwiz Sep 10, 2024
0365200
Add Java distribution
tiwiz Sep 10, 2024
c26f65d
Merge pull request #477 from android/upload-artifact-v4
tiwiz Sep 10, 2024
23b716f
Update to latest Compose version
Sep 10, 2024
eb0ed27
Merge pull request #475 from tiwiz/material-1.1.0-alpha01
tiwiz Sep 10, 2024
37dbddc
Merge branch 'android:main' into Kotlin-2.0
tiwiz Sep 10, 2024
b9e3899
Merge pull request #476 from tiwiz/Kotlin-2.0
tiwiz Sep 10, 2024
6ce1455
Update Feed-Compose to latest compose version
Sep 11, 2024
5a9cfd8
Merge pull request #478 from tiwiz/clean-projects
tiwiz Sep 12, 2024
ae7c8cf
Update List-Detail to latest M3 alpha
Dec 5, 2024
eeb3e9a
Update Supporting Pane to latest Material 3 alpha
Dec 5, 2024
754997d
Merge pull request #480 from tiwiz/ro-update-ls-to-m3-140-alpha4
tiwiz Jan 7, 2025
3c44564
Add workflow_dispatch trigger to workflows from GitHub
cartland Apr 17, 2025
2c0b04e
Deprecating user-interface-samples
yrezgui Jul 11, 2025
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
15 changes: 8 additions & 7 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
name: Android CI

on:
workflow_dispatch:
push:
branches:
- main
Expand All @@ -26,17 +27,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: set up JDK 11
uses: actions/setup-java@v1
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
distribution: 'zulu'
java-version: '17'

- name: Generate cache key
run: .github/scripts/checksum.sh checksum.txt

- uses: actions/cache@v2
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches/modules-*
Expand All @@ -53,7 +55,6 @@ jobs:
run: zip -r assemble.zip . -i '**/build/*.apk' '**/build/*.aab' '**/build/*.aar' '**/build/*.so'

- name: Upload artifacts
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: assemble
path: assemble.zip
1 change: 1 addition & 0 deletions .github/workflows/copy-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: Duplicates main to old master branch
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
workflow_dispatch:
push:
branches: [ main ]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Dec 07 10:07:34 CET 2022
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-rc-1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion AppWidget/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Apr 05 16:14:35 JST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
29 changes: 17 additions & 12 deletions CanonicalLayouts/feed-compose/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id("org.jetbrains.kotlin.plugin.compose") version "2.0.0"
}

android {
compileSdk 33
compileSdk 35

defaultConfig {
applicationId "com.example.feed_compose"
minSdk 21
targetSdk 33
targetSdk 35
versionCode 1
versionName "1.0"

Expand All @@ -51,34 +52,38 @@ android {
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.3.2'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
namespace 'com.example.feedcompose'
}

composeCompiler {
enableStrongSkippingMode = true

reportsDestination = layout.buildDirectory.dir("compose_compiler")
}

dependencies {
def composeBom = platform('androidx.compose:compose-bom:2022.10.00')
def composeBom = platform('androidx.compose:compose-bom:2024.09.00')
implementation(composeBom)
androidTestImplementation(composeBom)

implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.core:core-ktx:1.13.1'
implementation "androidx.compose.ui:ui"
implementation 'androidx.compose.material3:material3'
implementation 'androidx.compose.material3:material3-window-size-class'
implementation "androidx.compose.ui:ui-tooling-preview"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
implementation 'androidx.activity:activity-compose:1.6.1'
implementation 'androidx.navigation:navigation-compose:2.5.3'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.8.5'
implementation 'androidx.activity:activity-compose:1.9.2'
implementation 'androidx.navigation:navigation-compose:2.8.0'
implementation 'io.coil-kt:coil-compose:2.2.1'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
debugImplementation "androidx.compose.ui:ui-tooling"
debugImplementation "androidx.compose.ui:ui-test-manifest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.feedcompose">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@ package com.example.feedcompose.ui.components
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.SmallTopAppBar
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import com.example.feedcompose.R


@OptIn(ExperimentalMaterial3Api::class)
@Composable
internal fun TopAppBar(onBackPressed: () -> Unit = {}) {
SmallTopAppBar(
title = { Text(text = stringResource(id = R.string.app_name)) },
navigationIcon = { BackButton(onBackPressed) }
)
internal fun SweetTopAppBar(onBackPressed: () -> Unit) {
TopAppBar(title = { Text(text = stringResource(id = R.string.app_name)) },
navigationIcon = {
BackButton(onBackPressed = onBackPressed)
})
}

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import com.example.feedcompose.R
import com.example.feedcompose.data.Sweets
import com.example.feedcompose.ui.components.TopAppBar
import com.example.feedcompose.ui.components.SweetTopAppBar

@Composable
fun SweetsDetails(
Expand All @@ -53,18 +53,21 @@ fun SweetsDetails(
scrollState = scrollState,
onBackPressed = onBackPressed
)

WindowWidthSizeClass.Compact -> SweetsDetailsVertical(
sweets = sweets,
scrollState = scrollState,
onBackPressed = onBackPressed
)

else -> {
when (windowSizeClass.heightSizeClass) {
WindowHeightSizeClass.Expanded -> SweetsDetailsVertical(
sweets = sweets,
scrollState = scrollState,
onBackPressed = onBackPressed
)

else -> SweetsDetailsHorizontal(
sweets = sweets,
scrollState = scrollState,
Expand All @@ -82,7 +85,7 @@ private fun SweetsDetailsVertical(
onBackPressed: () -> Unit
) {
Column(modifier = Modifier.verticalScroll(scrollState)) {
TopAppBar(onBackPressed = onBackPressed)
SweetTopAppBar(onBackPressed = onBackPressed)
AsyncImage(
model = sweets.imageUrl,
contentDescription = stringResource(id = R.string.thumbnail_content_description),
Expand All @@ -105,7 +108,7 @@ private fun SweetsDetailsHorizontal(
onBackPressed: () -> Unit
) {
Column {
TopAppBar(onBackPressed = onBackPressed)
SweetTopAppBar(onBackPressed = onBackPressed)
Row {
AsyncImage(
model = sweets.imageUrl,
Expand Down
6 changes: 3 additions & 3 deletions CanonicalLayouts/feed-compose/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
*/

plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
id 'com.android.application' version '8.6.0' apply false
id 'com.android.library' version '8.6.0' apply false
id 'org.jetbrains.kotlin.android' version '2.0.0' apply false
id 'com.diffplug.spotless' version '6.9.0'
}

Expand Down
4 changes: 3 additions & 1 deletion CanonicalLayouts/feed-compose/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
android.defaults.buildfeatures.buildconfig=true
android.nonFinalResIds=false
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Aug 10 10:35:30 JST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
21 changes: 11 additions & 10 deletions CanonicalLayouts/feed-view/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ plugins {
}

android {
compileSdk 32
compileSdk 35

defaultConfig {
applicationId "com.example.viewbasedfeedlayoutsample"
minSdk 21
targetSdk 32
targetSdk 35
versionCode 1
versionName "1.0"

Expand All @@ -48,19 +48,20 @@ android {
buildFeatures {
viewBinding true
}
namespace 'com.example.viewbasedfeedlayoutsample'
}

dependencies {
implementation 'androidx.core:core-ktx:1.8.0'
implementation 'androidx.appcompat:appcompat:1.4.2'
implementation 'com.google.android.material:material:1.7.0-alpha03'
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.1'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.1'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.7'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'io.coil-kt:coil:2.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
}
3 changes: 1 addition & 2 deletions CanonicalLayouts/feed-view/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
-->

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.example.viewbasedfeedlayoutsample">
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET" />

Expand Down
8 changes: 4 additions & 4 deletions CanonicalLayouts/feed-view/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ buildscript {
google()
}
dependencies {
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.5.1"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.7.7"
}
}

plugins {
id 'com.android.application' version '7.2.2' apply false
id 'com.android.library' version '7.2.2' apply false
id 'org.jetbrains.kotlin.android' version '1.7.10' apply false
id 'com.android.application' version '8.6.0' apply false
id 'com.android.library' version '8.6.0' apply false
id 'org.jetbrains.kotlin.android' version '2.0.0' apply false
id 'com.diffplug.spotless' version '6.9.0'
}

Expand Down
3 changes: 2 additions & 1 deletion CanonicalLayouts/feed-view/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ kotlin.code.style=official
# Enables namespacing of each library's R class so that its R class includes only the
# resources declared in the library itself and none from the library's dependencies,
# thereby reducing the size of the R class for that library
android.nonTransitiveRClass=true
android.nonTransitiveRClass=true
android.nonFinalResIds=false
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Wed Aug 03 13:58:14 JST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
33 changes: 20 additions & 13 deletions CanonicalLayouts/list-detail-activity-embedding/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ plugins {
}

android {
compileSdk 32
compileSdk 35

defaultConfig {
applicationId "com.example.activityembedding"
minSdk 31
targetSdk 32
targetSdk 35
versionCode 1
versionName "1.0"

Expand All @@ -48,23 +48,30 @@ android {
kotlinOptions {
jvmTarget = '1.8'
}
namespace 'com.example.activityembedding'
}

dependencies {

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation "androidx.recyclerview:recyclerview:1.2.1"
implementation 'androidx.core:core-ktx:1.13.1'
implementation 'androidx.appcompat:appcompat:1.7.0'
implementation 'com.google.android.material:material:1.12.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "androidx.recyclerview:recyclerview:1.3.2"
// For control over item selection of both touch and mouse driven selection
implementation "androidx.recyclerview:recyclerview-selection:1.1.0"
implementation "androidx.cardview:cardview:1.0.0"
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.2'
implementation 'androidx.navigation:navigation-ui-ktx:2.5.2'
implementation("androidx.window:window:1.1.0-alpha03")
implementation("androidx.startup:startup-runtime:1.1.0")
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.7'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.7'
implementation("androidx.window:window:1.3.0")
implementation("androidx.startup:startup-runtime:1.1.1")
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation 'androidx.test.ext:junit:1.2.1'
androidTestImplementation("androidx.test:core-ktx:1.6.1")
androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.6.1'
androidTestImplementation 'androidx.test.espresso:espresso-device:1.0.1'
androidTestImplementation("androidx.test.ext:junit-ktx:1.2.1")
androidTestImplementation("androidx.test.ext:truth:1.6.0")
androidTestImplementation("androidx.test:runner:1.6.2")
}
Loading