TP-0000 | Updated AGP + JDK (#182)
This commit is contained in:
@@ -44,11 +44,11 @@ android {
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
sourceCompatibility JavaVersion.VERSION_17
|
||||
targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '11'
|
||||
jvmTarget = '17'
|
||||
}
|
||||
buildFeatures {
|
||||
compose true
|
||||
|
||||
@@ -20,7 +20,9 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
@@ -47,16 +49,25 @@ import com.uitron.demo.theme.fontFamily
|
||||
|
||||
@Composable
|
||||
fun HomeScreen(navHostController: NavHostController) {
|
||||
Column(modifier = Modifier.fillMaxSize(), horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.verticalScroll(state = rememberScrollState(), enabled = true),
|
||||
horizontalAlignment = Alignment.CenterHorizontally,
|
||||
) {
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(top = 42.dp),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(top = 42.dp),
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Image(
|
||||
painter = painterResource(id = com.uitron.demo.R.drawable.uitron),
|
||||
contentDescription = null,
|
||||
modifier = Modifier.height(40.dp).width(40.dp),
|
||||
modifier = Modifier
|
||||
.height(40.dp)
|
||||
.width(40.dp),
|
||||
colorFilter = ColorFilter.tint(color = Color.DarkGray)
|
||||
)
|
||||
Spacer(modifier = Modifier.width(10.dp))
|
||||
@@ -82,48 +93,49 @@ fun HomeScreen(navHostController: NavHostController) {
|
||||
|
||||
PlaygroundBubble(
|
||||
modifier =
|
||||
Modifier.constrainAs(playgroundRef) {
|
||||
start.linkTo(parent.start, 16.dp)
|
||||
top.linkTo(parent.top, 8.dp)
|
||||
end.linkTo(startGuideline, 8.dp)
|
||||
width = Dimension.fillToConstraints
|
||||
},
|
||||
Modifier.constrainAs(playgroundRef) {
|
||||
start.linkTo(parent.start, 16.dp)
|
||||
top.linkTo(parent.top, 8.dp)
|
||||
end.linkTo(startGuideline, 8.dp)
|
||||
width = Dimension.fillToConstraints
|
||||
},
|
||||
navHostController = navHostController,
|
||||
)
|
||||
|
||||
MockBubble(
|
||||
modifier =
|
||||
Modifier.constrainAs(mockRef) {
|
||||
start.linkTo(startGuideline, 8.dp)
|
||||
end.linkTo(parent.end, 16.dp)
|
||||
top.linkTo(parent.top, 8.dp)
|
||||
width = Dimension.fillToConstraints
|
||||
},
|
||||
Modifier.constrainAs(mockRef) {
|
||||
start.linkTo(startGuideline, 8.dp)
|
||||
end.linkTo(parent.end, 16.dp)
|
||||
top.linkTo(parent.top, 8.dp)
|
||||
width = Dimension.fillToConstraints
|
||||
},
|
||||
navHostController = navHostController,
|
||||
)
|
||||
|
||||
DesignSystemBubble(
|
||||
modifier =
|
||||
Modifier.constrainAs(designSystemRef) {
|
||||
start.linkTo(startGuideline, 8.dp)
|
||||
end.linkTo(parent.end, 16.dp)
|
||||
top.linkTo(mockRef.bottom, 16.dp)
|
||||
width = Dimension.fillToConstraints
|
||||
},
|
||||
Modifier.constrainAs(designSystemRef) {
|
||||
start.linkTo(startGuideline, 8.dp)
|
||||
end.linkTo(parent.end, 16.dp)
|
||||
top.linkTo(mockRef.bottom, 16.dp)
|
||||
width = Dimension.fillToConstraints
|
||||
},
|
||||
navHostController = navHostController,
|
||||
)
|
||||
|
||||
DazzleDesignSystemBubble(
|
||||
modifier =
|
||||
Modifier.constrainAs(dazzleDesignSystemRef) {
|
||||
start.linkTo(parent.start, 16.dp)
|
||||
end.linkTo(parent.end, 16.dp)
|
||||
top.linkTo(playgroundRef.bottom, 16.dp)
|
||||
width = Dimension.fillToConstraints
|
||||
},
|
||||
Modifier.constrainAs(dazzleDesignSystemRef) {
|
||||
start.linkTo(parent.start, 16.dp)
|
||||
end.linkTo(parent.end, 16.dp)
|
||||
top.linkTo(playgroundRef.bottom, 16.dp)
|
||||
width = Dimension.fillToConstraints
|
||||
},
|
||||
navHostController = navHostController,
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,10 +203,10 @@ fun Bubble(
|
||||
) {
|
||||
Box(
|
||||
modifier =
|
||||
modifier
|
||||
.height(height.dp)
|
||||
.background(color = backgroundColor, shape = RoundedCornerShape(cornerRadius.dp))
|
||||
.clickable { navHostController.navigate(navigationRoute) },
|
||||
modifier
|
||||
.height(height.dp)
|
||||
.background(color = backgroundColor, shape = RoundedCornerShape(cornerRadius.dp))
|
||||
.clickable { navHostController.navigate(navigationRoute) },
|
||||
contentAlignment = Alignment.Center
|
||||
) {
|
||||
Text(
|
||||
|
||||
Reference in New Issue
Block a user