Skip to content

Commit

Permalink
Updated the AGP and the help composable screen look and feel.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihai-Cristian Condrea committed May 23, 2024
1 parent ce97d39 commit 6604ee4
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
5 changes: 3 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ dependencies {
// Google
implementation(libs.play.services.ads)
implementation(libs.billing)
implementation("com.google.android.material:material:1.12.0")
implementation(libs.material)
implementation(libs.play.services.oss.licenses)
implementation(libs.review.ktx)
implementation(libs.app.update.ktx)
Expand All @@ -113,14 +113,15 @@ dependencies {
implementation(libs.androidx.runtime)
implementation(libs.androidx.runtime.livedata)
implementation(libs.androidx.ui)
implementation(libs.androidx.graphics.shapes)
implementation(libs.androidx.constraintlayout.compose)
implementation(libs.ui.tooling)
implementation(libs.androidx.datastore.core)
implementation(libs.androidx.navigation.compose)

// AndroidX
implementation(libs.androidx.core.ktx)
implementation("androidx.appcompat:appcompat:1.6.1")
implementation(libs.androidx.appcompat)
implementation(libs.androidx.core.splashscreen)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.process)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
package com.d4rk.cartcalculator.ui.help

import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.safeDrawingPadding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.ArrowBack
import androidx.compose.material.icons.filled.MailOutline
import androidx.compose.material.icons.filled.MoreVert
import androidx.compose.material.icons.outlined.QuestionAnswer
import androidx.compose.material3.Card
import androidx.compose.material3.DropdownMenu
import androidx.compose.material3.DropdownMenuItem
Expand Down Expand Up @@ -112,7 +118,7 @@ fun HelpComposable(activity : HelpActivity) {
.safeDrawingPadding()
) {
ConstraintLayout(modifier = Modifier.padding(paddingValues)) {
val (faqTitle , faqCard , fabButton) = createRefs()
val (faqTitle , faqCard) = createRefs()
Text(text = stringResource(R.string.faq) ,
modifier = Modifier
.padding(bottom = 24.dp)
Expand Down Expand Up @@ -210,13 +216,29 @@ fun FAQComposable() {

@Composable
fun QuestionComposable(title : String , summary : String) {
Column(
Row(
modifier = Modifier
.fillMaxWidth()
.padding(16.dp)
.padding(16.dp) ,
verticalAlignment = Alignment.CenterVertically
) {
Text(text = title , style = MaterialTheme.typography.titleMedium)
Spacer(modifier = Modifier.height(8.dp))
Text(text = summary)
Icon(
Icons.Outlined.QuestionAnswer ,
contentDescription = null ,
modifier = Modifier
.size(48.dp)
.background(
color = MaterialTheme.colorScheme.primaryContainer , shape = CircleShape
)
.padding(8.dp)
)
Spacer(modifier = Modifier.width(16.dp))
Column {
Text(
text = title , style = MaterialTheme.typography.titleMedium
)
Spacer(modifier = Modifier.height(4.dp))
Text(text = summary)
}
}
}
8 changes: 7 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
[versions]
agp = "8.4.0"
agp = "8.4.1"
appcompat = "1.6.1"
appUpdateKtx = "2.1.0"
composeBom = "2024.05.00"
coreKtx = "1.13.1"
billing = "7.0.0"
datastoreCore = "1.1.1"
graphicsShapes = "1.0.0-beta01"
lifecycleCommonJava8 = "2.8.0"
lifecycleLivedataKtx = "2.8.0"
lifecycleProcess = "2.8.0"
lifecycleRuntimeKtx = "2.8.0"
lifecycleViewmodelKtx = "2.8.0"
material = "1.12.0"
multidex = "2.0.1"
volley = "1.2.1"
workRuntimeKtx = "2.9.0"
Expand All @@ -35,12 +38,14 @@ reviewKtx = "2.0.1"
[libraries]
androidx-animation-core = { module = "androidx.compose.animation:animation-core" }
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "appcompat" }
androidx-compose-bom = { module = "androidx.compose:compose-bom", version.ref = "composeBom" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "coreSplashscreen" }
androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "constraintlayoutCompose" }
androidx-datastore-core = { module = "androidx.datastore:datastore-core", version.ref = "datastoreCore" }
androidx-foundation = { module = "androidx.compose.foundation:foundation" }
androidx-graphics-shapes = { module = "androidx.graphics:graphics-shapes", version.ref = "graphicsShapes" }
androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-common-java8", version.ref = "lifecycleCommonJava8" }
androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "lifecycleLivedataKtx" }
androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "lifecycleProcess" }
Expand Down Expand Up @@ -68,6 +73,7 @@ firebase-perf = { module = "com.google.firebase:firebase-perf" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
material = { module = "com.google.android.material:material", version.ref = "material" }
play-services-ads = { module = "com.google.android.gms:play-services-ads", version.ref = "playServicesAds" }
play-services-oss-licenses = { module = "com.google.android.gms:play-services-oss-licenses", version.ref = "playServicesOssLicenses" }
review-ktx = { module = "com.google.android.play:review-ktx", version.ref = "reviewKtx" }
Expand Down

0 comments on commit 6604ee4

Please sign in to comment.