Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update AGP Dependency #13

Merged
merged 1 commit into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ android {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
"proguard-rules.pro",
)
}
}
Expand All @@ -50,22 +50,22 @@ android {

dependencies {

implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.activity:activity-compose:1.8.2")
implementation(platform("androidx.compose:compose-bom:2023.09.00"))
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.1")
implementation("androidx.activity:activity-compose:1.9.0")
implementation(platform("androidx.compose:compose-bom:2024.05.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.navigation:navigation-compose:2.7.6")
implementation("androidx.navigation:navigation-compose:2.7.7")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.09.00"))
androidTestImplementation(platform("androidx.compose:compose-bom:2024.05.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")

implementation(project(":bottombar"))
implementation(kotlin("reflect"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ class ExampleInstrumentedTest {
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.animatedbottombarcompose", appContext.packageName)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ class MainActivity : ComponentActivity() {
super.onCreate(savedInstanceState)
setContent {
AnimatedBottomBarComposeTheme {

val navController = rememberNavController()
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentRoute = navBackStackEntry?.destination?.route
val navigationItems = MainNavigation::class.nestedClasses.map {
it.objectInstance as MainNavigation
}
val navigationItems =
MainNavigation::class.nestedClasses.map {
it.objectInstance as MainNavigation
}
var selectedItem by remember { mutableIntStateOf(0) }

Scaffold(
Expand All @@ -44,7 +44,7 @@ class MainActivity : ComponentActivity() {
selectedItem = selectedItem,
itemSize = navigationItems.take(3).size,
containerColor = Color.LightGray,
indicatorStyle = IndicatorStyle.DOT
indicatorStyle = IndicatorStyle.DOT,
) {
navigationItems.take(3).forEachIndexed { index, navigationItem ->
BottomBarItem(
Expand All @@ -66,15 +66,15 @@ class MainActivity : ComponentActivity() {
},
imageVector = navigationItem.icon,
label = navigationItem.title,
containerColor = Color.Transparent
containerColor = Color.Transparent,
)
}
}
}
},
) {
NavHost(
navController = navController,
startDestination = MainNavigation.ScreenA.route
startDestination = MainNavigation.ScreenA.route,
) {
composable(MainNavigation.ScreenA.route) {
Screen1(navigationItems)
Expand All @@ -90,4 +90,4 @@ class MainActivity : ComponentActivity() {
}
}
}
}
}
Loading
Loading