Skip to content

Commit

Permalink
Merge pull request #460 from tiwiz/ro_list_detail_alpha09
Browse files Browse the repository at this point in the history
Update List-Detail sample to Material 3 Adaptive
  • Loading branch information
tiwiz committed Apr 19, 2024
2 parents 181ebfa + 1261217 commit a14e648
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 542 deletions.
13 changes: 8 additions & 5 deletions CanonicalLayouts/list-detail-compose/app/build.gradle
Expand Up @@ -62,18 +62,21 @@ android {
}

dependencies {
def composeBom = platform('androidx.compose:compose-bom:2023.10.01')
def composeBom = platform('androidx.compose:compose-bom:2024.03.00')
implementation(composeBom)

implementation "com.google.accompanist:accompanist-adaptive:0.32.0"
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.7.0'
implementation 'androidx.activity:activity-compose:1.8.2'
implementation "androidx.compose.foundation:foundation:1.6.0-rc01"
implementation "androidx.compose.ui:ui:1.6.0-rc01"
implementation "androidx.compose.foundation:foundation:1.6.4"
implementation "androidx.compose.ui:ui:1.6.4"
implementation "androidx.compose.ui:ui-tooling-preview"
implementation "androidx.window:window:1.2.0"
implementation 'androidx.compose.material3:material3'
implementation "androidx.compose.material3:material3-window-size-class"
implementation 'androidx.compose.material3:material3:1.3.0-alpha03'
implementation 'androidx.compose.material3.adaptive:adaptive:1.0.0-alpha09'
implementation 'androidx.compose.material3.adaptive:adaptive-layout:1.0.0-alpha09'
implementation 'androidx.compose.material3.adaptive:adaptive-navigation:1.0.0-alpha09'
implementation "androidx.compose.material3:material3-window-size-class:1.3.0-alpha03"
testImplementation 'junit:junit:4.13.2'
}
Expand Up @@ -20,24 +20,17 @@ import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Surface
import androidx.compose.material3.windowsizeclass.ExperimentalMaterial3WindowSizeClassApi
import androidx.compose.material3.windowsizeclass.calculateWindowSizeClass
import androidx.compose.ui.Modifier
import com.example.listdetailcompose.ui.ListDetailSample
import com.example.listdetailcompose.ui.theme.ListDetailComposeTheme
import com.google.accompanist.adaptive.calculateDisplayFeatures

class MainActivity : ComponentActivity() {
@OptIn(ExperimentalMaterial3WindowSizeClassApi::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
ListDetailComposeTheme {
Surface(modifier = Modifier.fillMaxSize()) {
ListDetailSample(
windowSizeClass = calculateWindowSizeClass(this),
displayFeatures = calculateDisplayFeatures(this)
)
ListDetailSample()
}
}
}
Expand Down

0 comments on commit a14e648

Please sign in to comment.