Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
Upgraded to compose version 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkitSuda committed Oct 1, 2021
1 parent ce9d11a commit 9fd73ed
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ android {
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
kotlinCompilerVersion '1.5.21'
kotlinCompilerVersion '1.5.30'
}
packagingOptions {
resources {
Expand Down Expand Up @@ -77,13 +77,13 @@ dependencies {
//navigation
implementation "androidx.navigation:navigation-fragment-ktx:2.3.5"
implementation "androidx.navigation:navigation-ui-ktx:2.3.5"
implementation "androidx.navigation:navigation-compose:2.4.0-alpha09"
implementation "androidx.navigation:navigation-compose:2.4.0-alpha10"

implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.3.1"

def accompanistVersion = "0.18.0"
def accompanistVersion = "0.19.0"
implementation "com.google.accompanist:accompanist-pager:$accompanistVersion"
implementation "com.google.accompanist:accompanist-pager-indicators:$accompanistVersion"
implementation "com.google.accompanist:accompanist-insets:$accompanistVersion"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ fun ExerciseDetailScreen(
"About"
)
val pagerState = rememberPagerState(
pageCount = tabData.size,
initialOffscreenLimit = 2,
infiniteLoop = false,

// pageCount = tabData.size,
// initialOffscreenLimit = 2,
// infiniteLoop = false,
initialPage = 0,
)
val tabIndex = pagerState.currentPage
Expand Down Expand Up @@ -116,6 +117,7 @@ fun ExerciseDetailScreen(
HorizontalPager(
state = pagerState,
verticalAlignment = Alignment.Top,
count = 3,
) { index ->
when (index) {
0 -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ fun ExercisesScreen(
val tabData = arrayListOf<Any>("All").apply { addAll(allMuscles) }

val pagerState = rememberPagerState(
pageCount = tabData.size,
initialOffscreenLimit = 2,
infiniteLoop = false,
// pageCount = tabData.size,
// initialOffscreenLimit = 2,
// infiniteLoop = false,
initialPage = 0,
)
val tabIndex = pagerState.currentPage
Expand Down Expand Up @@ -148,6 +148,7 @@ fun ExercisesScreen(
HorizontalPager(
state = pagerState,
verticalAlignment = Alignment.Top,
count = tabData.size,
) { index ->
LazyColumn(
modifier = Modifier
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/ankitsuda/rebound/ui/theme/Theme.kt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fun ReboundThemeWrapper(
),
)

val typography = TypographyInter
// val typography = TypographyInter

// Getting instance of systemUiController
val systemUiController = rememberSystemUiController()
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

buildscript {
ext {
compose_version = '1.0.2'
compose_version = '1.0.3'
}
repositories {
google()
Expand All @@ -13,7 +13,7 @@ buildscript {

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.30"
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.38.1'

// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit 9fd73ed

Please sign in to comment.