diff --git a/app/src/main/java/com/example/androidlabs/Hotel.kt b/app/src/main/java/com/example/androidlabs/Hotel.kt
index f687302..a0568b7 100644
--- a/app/src/main/java/com/example/androidlabs/Hotel.kt
+++ b/app/src/main/java/com/example/androidlabs/Hotel.kt
@@ -5,5 +5,7 @@ data class Hotel(
val name: String,
val img: Int,
val stars: Int,
- val location: String
+ val location: String,
+ val info: String,
+ val price: Int,
)
\ No newline at end of file
diff --git a/app/src/main/java/com/example/androidlabs/Navigation/NavController.kt b/app/src/main/java/com/example/androidlabs/Navigation/NavController.kt
index e17c94e..53a001e 100644
--- a/app/src/main/java/com/example/androidlabs/Navigation/NavController.kt
+++ b/app/src/main/java/com/example/androidlabs/Navigation/NavController.kt
@@ -25,7 +25,7 @@ fun NavController(navController: NavHostController) {
startDestination = NavItem.Home.route
) {
composable(NavItem.HotelInfo.route) {
- HotelInfo(Hotel("hotel", R.drawable.img_1, 4, "location"), navController)
+ HotelInfo(Hotel("hotel", R.drawable.img_1, 4, "location", "info", 4000), navController)
}
composable(NavItem.Home.route) {
HomeScreen(navController)
diff --git a/app/src/main/java/com/example/androidlabs/adminPanel/AddPanel.kt b/app/src/main/java/com/example/androidlabs/adminPanel/AddPanel.kt
index e39fba9..9e27e38 100644
--- a/app/src/main/java/com/example/androidlabs/adminPanel/AddPanel.kt
+++ b/app/src/main/java/com/example/androidlabs/adminPanel/AddPanel.kt
@@ -51,7 +51,6 @@ fun AddPanel(){
.fillMaxWidth()
.padding(16.dp)
.clip(RoundedCornerShape(16.dp))
- .background((Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF)))
.verticalScroll(rememberScrollState())
) {
Column(
@@ -70,7 +69,7 @@ fun AddPanel(){
)
Button(
colors = ButtonDefaults.buttonColors(
- backgroundColor = Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF),
+ backgroundColor = colorResource(id = R.color.figma_blue),
contentColor = Color.White
),
onClick = {
@@ -79,6 +78,7 @@ fun AddPanel(){
modifier = Modifier
.fillMaxWidth()
.padding(16.dp, 0.dp, 16.dp, 16.dp)
+ .height(50.dp)
) {
Text("Add image")
}
@@ -103,16 +103,15 @@ fun AddPanel(){
),
placeholder = {
Text(
- text = "Brand",
+ text = "Stars",
style = TextStyle(fontSize = 12.sp)
)
}
)
-
Spacer(modifier = Modifier.height(16.dp))
TextField(
- value = " ",
+ value = "",
onValueChange = { },
modifier = Modifier
.fillMaxWidth()
@@ -131,7 +130,7 @@ fun AddPanel(){
),
placeholder = {
Text(
- text = "Model",
+ text = "Location",
style = TextStyle(fontSize = 12.sp)
)
}
@@ -140,13 +139,14 @@ fun AddPanel(){
Spacer(modifier = Modifier.height(16.dp))
TextField(
- value = " ",
+ value = "",
onValueChange = { },
modifier = Modifier
.fillMaxWidth()
- .height(150.dp)
+ .height(50.dp)
.padding(16.dp, 0.dp)
.border(1.dp, Color.Gray, RoundedCornerShape(4.dp)),
+ singleLine = true,
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Text,
imeAction = ImeAction.Next
@@ -158,12 +158,11 @@ fun AddPanel(){
),
placeholder = {
Text(
- text = "Description",
+ text = "Info",
style = TextStyle(fontSize = 12.sp)
)
}
)
-
Spacer(modifier = Modifier.height(16.dp))
TextField(
@@ -191,10 +190,37 @@ fun AddPanel(){
)
}
)
+ Spacer(modifier = Modifier.height(16.dp))
+
+ TextField(
+ value = "",
+ onValueChange = { },
+ modifier = Modifier
+ .fillMaxWidth()
+ .height(50.dp)
+ .padding(16.dp, 0.dp)
+ .border(1.dp, Color.Gray, RoundedCornerShape(4.dp)),
+ singleLine = true,
+ keyboardOptions = KeyboardOptions(
+ keyboardType = KeyboardType.Text,
+ imeAction = ImeAction.Next
+ ),
+ keyboardActions = KeyboardActions(
+ onNext = {
+
+ }
+ ),
+ placeholder = {
+ Text(
+ text = "Info",
+ style = TextStyle(fontSize = 12.sp)
+ )
+ }
+ )
Button(
colors = ButtonDefaults.buttonColors(
- backgroundColor =(Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF)),
+ backgroundColor =colorResource(id = R.color.figma_blue),
contentColor = Color.White
),
onClick = {
@@ -203,8 +229,9 @@ fun AddPanel(){
modifier = Modifier
.fillMaxWidth()
.padding(16.dp)
+ .height(50.dp)
) {
- Text("Add sneaker")
+ Text("Add hotel")
}
}
}
diff --git a/app/src/main/java/com/example/androidlabs/adminPanel/AdminPanel.kt b/app/src/main/java/com/example/androidlabs/adminPanel/AdminPanel.kt
index bc87197..b930142 100644
--- a/app/src/main/java/com/example/androidlabs/adminPanel/AdminPanel.kt
+++ b/app/src/main/java/com/example/androidlabs/adminPanel/AdminPanel.kt
@@ -12,13 +12,16 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
+import androidx.navigation.compose.rememberNavController
+import com.example.androidlabs.profileScreen.signIn.LoginScreen
@Composable
fun AdminPanel(navHostController: NavHostController) {
var isAddPanelVisible by remember { mutableStateOf(false) }
- var isChangePanelVisible by remember { mutableStateOf(false) }
+ var isChangePanelVisible by remember { mutableStateOf(true) }
Column(
modifier = Modifier
@@ -45,4 +48,11 @@ fun AdminPanel(navHostController: NavHostController) {
ChangePanel(navHostController)
}
}
+}
+
+@Composable
+@Preview(showBackground = true)
+fun SignInScreenPreview(){
+ val navController = rememberNavController()
+ AdminPanel(navController)
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/androidlabs/adminPanel/CardHotelForChange.kt b/app/src/main/java/com/example/androidlabs/adminPanel/CardHotelForChange.kt
index c75b511..be4f65e 100644
--- a/app/src/main/java/com/example/androidlabs/adminPanel/CardHotelForChange.kt
+++ b/app/src/main/java/com/example/androidlabs/adminPanel/CardHotelForChange.kt
@@ -56,7 +56,7 @@ fun CardHotelForChange(item: Hotel, navController: NavHostController) {
.padding(start = 16.dp)
) {
item.name?.let { Text(text = it, fontSize = 20.sp) }
- Text(text = "${item.location} USD", color = Color.Red, fontSize = 16.sp)
+ Text(text = "${item.location}", color = Color.Red, fontSize = 16.sp)
}
Image(
@@ -66,8 +66,8 @@ fun CardHotelForChange(item: Hotel, navController: NavHostController) {
.size(40.dp)
.padding(10.dp)
.clickable {
- val sneakerItemString = Gson().toJson(item)
- navController.navigate("changeSneaker/${sneakerItemString}")
+ val hotelItemString = Gson().toJson(item)
+ navController.navigate("changeHotel/${hotelItemString}")
}
)
@@ -89,7 +89,7 @@ fun CardHotelForChange(item: Hotel, navController: NavHostController) {
@Composable
@Preview
-fun CardSneakerLikePreview(){
+fun CardHotelLikePreview(){
val navController = rememberNavController()
- CardHotelForChange(Hotel("Hotel", R.drawable.img, 5, "location"), navController)
+ CardHotelForChange(Hotel("Hotel", R.drawable.img, 5, "location", "info", 4000), navController)
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/androidlabs/adminPanel/ChangePanel.kt b/app/src/main/java/com/example/androidlabs/adminPanel/ChangePanel.kt
index c46212a..9f93dba 100644
--- a/app/src/main/java/com/example/androidlabs/adminPanel/ChangePanel.kt
+++ b/app/src/main/java/com/example/androidlabs/adminPanel/ChangePanel.kt
@@ -34,9 +34,9 @@ fun ChangePanel(navHostController: NavHostController){
) {
itemsIndexed(
listOf(
- Hotel("Hotel", R.drawable.img, 5, "location"),
- Hotel("Hotel", R.drawable.img, 5, "location"),
- Hotel("Hotel", R.drawable.img, 5, "location")
+ Hotel("Hotel", R.drawable.img, 5, "location", "info", 4000),
+ Hotel("Hotel", R.drawable.img, 5, "location", "info", 4000),
+ Hotel("Hotel", R.drawable.img, 5, "location", "info", 4000)
)
){_, item->
CardHotelForChange(item = item, navHostController)
diff --git a/app/src/main/java/com/example/androidlabs/booking/BookingScreen.kt b/app/src/main/java/com/example/androidlabs/booking/BookingScreen.kt
index b50284b..9a75066 100644
--- a/app/src/main/java/com/example/androidlabs/booking/BookingScreen.kt
+++ b/app/src/main/java/com/example/androidlabs/booking/BookingScreen.kt
@@ -16,6 +16,7 @@ import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material.Button
import androidx.compose.material.ButtonDefaults
import androidx.compose.material.Text
+import androidx.compose.material.TextField
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
@@ -24,40 +25,49 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.res.colorResource
+import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.input.KeyboardType
import androidx.compose.ui.text.input.PasswordVisualTransformation
+import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
+import androidx.navigation.compose.rememberNavController
+import com.example.androidlabs.R
+import com.example.androidlabs.profileScreen.signIn.LoginScreen
@Composable
fun BookingScreen() {
- var room by remember { mutableStateOf("") }
- var date by remember { mutableStateOf("") }
-
Column(
modifier = Modifier
.fillMaxSize()
.background(Color.White)
- .padding(15.dp, 0.dp)
+ .padding(16.dp)
,
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
- Text(text = "Booking", fontSize = 24.sp, fontWeight = FontWeight.Bold)
+ var room by remember { mutableStateOf("") }
+ var date by remember { mutableStateOf("") }
- Spacer(modifier = Modifier.height(16.dp))
+ Text(
+ text = "Booking",
+ fontSize = 24.sp,
+ fontWeight = FontWeight.Bold,
+ modifier = Modifier
+ .padding(16.dp)
+ )
- BasicTextField(
+ TextField(
value = room,
onValueChange = { room = it },
modifier = Modifier
.fillMaxWidth()
.height(50.dp)
- .padding(8.dp)
- .border(1.dp, Color.Gray, RoundedCornerShape(4.dp))
- .padding(8.dp),
+ .padding(16.dp, 0.dp)
+ .border(1.dp, Color.Gray, RoundedCornerShape(4.dp)),
singleLine = true,
keyboardOptions = KeyboardOptions(
keyboardType = KeyboardType.Text,
@@ -68,17 +78,24 @@ fun BookingScreen() {
}
),
+ placeholder = {
+ Text(
+ text = "Room",
+ style = TextStyle(fontSize = 12.sp)
+ )
+ }
)
- BasicTextField(
+ Spacer(modifier = Modifier.height(16.dp))
+
+ TextField(
value = date,
onValueChange = { date = it },
modifier = Modifier
.fillMaxWidth()
.height(50.dp)
- .padding(8.dp)
- .border(1.dp, Color.Gray, RoundedCornerShape(4.dp))
- .padding(8.dp),
+ .padding(16.dp, 0.dp)
+ .border(1.dp, Color.Gray, RoundedCornerShape(4.dp)),
singleLine = true,
visualTransformation = PasswordVisualTransformation(),
keyboardOptions = KeyboardOptions(
@@ -91,21 +108,35 @@ fun BookingScreen() {
}
),
- ){
-
- }
+ placeholder = {
+ Text(
+ text = "Date",
+ style = TextStyle(fontSize = 12.sp)
+ )
+ }
+ )
Button(
colors = ButtonDefaults.buttonColors(
- backgroundColor = (Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF)),
+ backgroundColor = (colorResource(id = R.color.figma_blue)),
contentColor = Color.White
),
onClick = {
- //TODO
+
},
- modifier = Modifier.fillMaxWidth()
+ modifier = Modifier
+ .fillMaxWidth()
+ .padding(16.dp, 16.dp, 16.dp, 0.dp)
+ .height(50.dp)
) {
Text("Payment")
}
+ }
}
-}
+
+@Composable
+@Preview(showBackground = true)
+fun BookingScreenPreview(){
+ val navController = rememberNavController()
+ BookingScreen()
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/androidlabs/homeScreen/HomeScreen.kt b/app/src/main/java/com/example/androidlabs/homeScreen/HomeScreen.kt
index 984b16f..4ed4386 100644
--- a/app/src/main/java/com/example/androidlabs/homeScreen/HomeScreen.kt
+++ b/app/src/main/java/com/example/androidlabs/homeScreen/HomeScreen.kt
@@ -13,11 +13,13 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
+import androidx.compose.ui.res.colorResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavHostController
+import androidx.navigation.compose.rememberNavController
import com.example.androidlabs.R
import com.example.androidlabs.homeScreen.CardItem.HotelCard
import com.example.androidlabs.Hotel
@@ -31,7 +33,7 @@ fun HomeScreen(navController: NavHostController) {
.background(Color.White)
) {
Box(modifier = Modifier
- .background(Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF))
+ .background(colorResource(id = R.color.figma_blue))
.fillMaxHeight(0.18f)
){
Column(
@@ -57,7 +59,7 @@ fun HomeScreen(navController: NavHostController) {
//.verticalScroll(rememberScrollState())
){
items(count = 100 ){
- HotelCard(Hotel("hotel", R.drawable.img, it % 6, "location"), navController)
+ HotelCard(Hotel("hotel", R.drawable.img, it % 6, "location", "info", 4000), navController)
}
}
@@ -66,5 +68,6 @@ fun HomeScreen(navController: NavHostController) {
@Preview(showBackground = true)
@Composable
fun HotelPreview() {
- //HomeScreen()
+ var nc = rememberNavController()
+ HomeScreen(nc)
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/androidlabs/homeScreen/SearchField/SearchField.kt b/app/src/main/java/com/example/androidlabs/homeScreen/SearchField/SearchField.kt
index 7a67beb..ce59cb7 100644
--- a/app/src/main/java/com/example/androidlabs/homeScreen/SearchField/SearchField.kt
+++ b/app/src/main/java/com/example/androidlabs/homeScreen/SearchField/SearchField.kt
@@ -35,7 +35,7 @@ fun SearchField(
modifier = modifier
.clip(RoundedCornerShape(30.dp))
.fillMaxWidth()
- .background(Color.LightGray)
+ .background(Color.White)
,
) {
Row(
diff --git a/app/src/main/java/com/example/androidlabs/hotelScreen/HotelInfo.kt b/app/src/main/java/com/example/androidlabs/hotelScreen/HotelInfo.kt
index 58df960..26864f6 100644
--- a/app/src/main/java/com/example/androidlabs/hotelScreen/HotelInfo.kt
+++ b/app/src/main/java/com/example/androidlabs/hotelScreen/HotelInfo.kt
@@ -2,6 +2,7 @@ package com.example.androidlabs.hotelScreen
import androidx.compose.animation.shrinkVertically
import androidx.compose.foundation.Image
+import androidx.compose.foundation.ScrollState
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
@@ -9,6 +10,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.rememberScrollState
@@ -26,10 +28,12 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
+import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
+import androidx.navigation.compose.rememberNavController
import com.example.androidlabs.Hotel
import com.example.androidlabs.R
import com.example.androidlabs.homeScreen.CardItem.HotelCard
@@ -59,6 +63,7 @@ fun HotelInfo(hotel: Hotel, navController: NavHostController) {
Row (
modifier = Modifier
.fillMaxWidth(),
+
horizontalArrangement = Arrangement.SpaceEvenly
){
Text(text = hotel.name)
@@ -127,17 +132,14 @@ fun HotelInfo(hotel: Hotel, navController: NavHostController) {
Text(text = "inf")
}
}
- //Divider(color = Color.Black, thickness = 1.dp)
Row(
- modifier = Modifier
- //.fillMaxHeight()
- .padding(horizontal = 60.dp)
+ modifier = Modifier
.padding(bottom = 60.dp),
verticalAlignment = Alignment.Bottom
){
Button(
colors = ButtonDefaults.buttonColors(
- backgroundColor = (Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF)),
+ backgroundColor = (colorResource(id = R.color.figma_blue)),
contentColor = Color.White
),
onClick = {
@@ -145,6 +147,8 @@ fun HotelInfo(hotel: Hotel, navController: NavHostController) {
},
modifier = Modifier
.fillMaxWidth()
+ .padding(16.dp, 16.dp, 16.dp, 5.dp)
+ .height(50.dp)
) {
Text("Select Room")
}
@@ -156,7 +160,7 @@ fun HotelInfo(hotel: Hotel, navController: NavHostController) {
@Preview(showBackground = true)
@Composable
fun HotelInfoPreview() {
-
- //HotelInfo(Hotel("hotel", R.drawable.img_1, 4, "location"))
+ val navController = rememberNavController()
+ HotelInfo(Hotel("hotel", R.drawable.img_1, 4, "location", "info", 4000), navController)
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/androidlabs/profileScreen/profile/ProfileScreen.kt b/app/src/main/java/com/example/androidlabs/profileScreen/profile/ProfileScreen.kt
index dbf96b4..c93331c 100644
--- a/app/src/main/java/com/example/androidlabs/profileScreen/profile/ProfileScreen.kt
+++ b/app/src/main/java/com/example/androidlabs/profileScreen/profile/ProfileScreen.kt
@@ -18,71 +18,76 @@ import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
import androidx.navigation.compose.rememberNavController
import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxHeight
+import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
+import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.ui.draw.clip
+import androidx.compose.ui.res.colorResource
+import com.example.androidlabs.R
@Composable
fun ProfileScreen(navController: NavHostController) {
Column(
modifier = Modifier
- .fillMaxSize()
- .background(Color.White),
+ .fillMaxWidth()
+ .fillMaxHeight()
+ .padding(16.dp),
verticalArrangement = Arrangement.Center,
- horizontalAlignment = Alignment.CenterHorizontally
){
Row(
- modifier = Modifier
- .clip(RoundedCornerShape(20.dp))
){
Button(
colors = ButtonDefaults.buttonColors(
- backgroundColor = (Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF)),
+ backgroundColor = (colorResource(id = R.color.figma_blue)),
contentColor = Color.White
),
onClick = {
navController.navigate("person")
},
modifier = Modifier
- .requiredSize(300.dp, 40.dp)
+ .fillMaxWidth()
+ .padding(16.dp, 0.dp, 16.dp, 0.dp)
+ .height(50.dp)
) {
Text(text = "Profile")
}
}
Spacer(modifier = Modifier.height(16.dp))
Row(
- modifier = Modifier
- .clip(RoundedCornerShape(20.dp))
){
Button(
colors = ButtonDefaults.buttonColors(
- backgroundColor = (Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF)),
+ backgroundColor = (colorResource(id = R.color.figma_blue)),
contentColor = Color.White
),
onClick = {
navController.navigate("login")
},
modifier = Modifier
- .requiredSize(300.dp, 40.dp)
+ .fillMaxWidth()
+ .padding(16.dp, 0.dp, 16.dp, 0.dp)
+ .height(50.dp)
) {
Text(text = "Sign In")
}
}
Spacer(modifier = Modifier.height(16.dp))
Row(
- modifier = Modifier
- .clip(RoundedCornerShape(20.dp))
){
Button(
colors = ButtonDefaults.buttonColors(
- backgroundColor = (Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF)),
+ backgroundColor = (colorResource(id = R.color.figma_blue)),
contentColor = Color.White
),
onClick = {
navController.navigate("signup")
},
modifier = Modifier
- .requiredSize(300.dp, 40.dp)
+ .fillMaxWidth()
+ .padding(16.dp, 0.dp, 16.dp, 0.dp)
+ .height(50.dp)
) {
Text(text = "Sign Up")
}
@@ -91,7 +96,7 @@ fun ProfileScreen(navController: NavHostController) {
}
@Composable
-@Preview
+@Preview(showBackground = true)
fun ProfileScreenPreview(){
val navController = rememberNavController()
ProfileScreen(navController = navController)
diff --git a/app/src/main/java/com/example/androidlabs/profileScreen/signIn/SignInCard.kt b/app/src/main/java/com/example/androidlabs/profileScreen/signIn/SignInCard.kt
index 8598cf7..e18e745 100644
--- a/app/src/main/java/com/example/androidlabs/profileScreen/signIn/SignInCard.kt
+++ b/app/src/main/java/com/example/androidlabs/profileScreen/signIn/SignInCard.kt
@@ -38,6 +38,8 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavHostController
+import androidx.navigation.compose.rememberNavController
+import com.example.androidlabs.R
@Composable
fun SignInCard(navController: NavHostController) {
@@ -46,7 +48,7 @@ fun SignInCard(navController: NavHostController) {
.fillMaxWidth()
.padding(16.dp)
.clip(RoundedCornerShape(16.dp))
- .background((Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF)))
+
){
Column(
modifier = Modifier.fillMaxWidth(),
@@ -122,8 +124,8 @@ fun SignInCard(navController: NavHostController) {
Button(
colors = ButtonDefaults.buttonColors(
- backgroundColor = Color.White,
- contentColor = Color.Black
+ backgroundColor = (colorResource(id = R.color.figma_blue)),
+ contentColor = Color.White
),
onClick = {
@@ -131,6 +133,7 @@ fun SignInCard(navController: NavHostController) {
modifier = Modifier
.fillMaxWidth()
.padding(16.dp, 16.dp, 16.dp, 0.dp)
+ .height(50.dp)
) {
Text("Sign In")
}
@@ -144,4 +147,11 @@ fun SignInCard(navController: NavHostController) {
)
}
}
+}
+
+@Composable
+@Preview(showBackground = true)
+fun SignInScreenPreview(){
+ val navController = rememberNavController()
+ LoginScreen(navController = navController)
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/androidlabs/profileScreen/signIn/SignInScreen.kt b/app/src/main/java/com/example/androidlabs/profileScreen/signIn/SignInScreen.kt
index d660734..d717db4 100644
--- a/app/src/main/java/com/example/androidlabs/profileScreen/signIn/SignInScreen.kt
+++ b/app/src/main/java/com/example/androidlabs/profileScreen/signIn/SignInScreen.kt
@@ -23,6 +23,7 @@ import androidx.compose.ui.unit.sp
import androidx.navigation.NavController
import androidx.navigation.NavHostController
import androidx.navigation.compose.rememberNavController
+import com.example.androidlabs.profileScreen.profile.ProfileScreen
import androidx.compose.material.Text as Text1
@Composable
@@ -34,4 +35,11 @@ fun LoginScreen(navController: NavHostController) {
) {
SignInCard(navController)
}
+}
+
+@Composable
+@Preview
+fun LoginScreenPreview(){
+ val navController = rememberNavController()
+ LoginScreen(navController = navController)
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/androidlabs/profileScreen/signUp/SignUpCard.kt b/app/src/main/java/com/example/androidlabs/profileScreen/signUp/SignUpCard.kt
index 79e308d..206a754 100644
--- a/app/src/main/java/com/example/androidlabs/profileScreen/signUp/SignUpCard.kt
+++ b/app/src/main/java/com/example/androidlabs/profileScreen/signUp/SignUpCard.kt
@@ -34,6 +34,9 @@ import androidx.compose.ui.text.input.PasswordVisualTransformation
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
+import androidx.navigation.compose.rememberNavController
+import com.example.androidlabs.R
+import com.example.androidlabs.profileScreen.signIn.LoginScreen
@Composable
@Preview
@@ -48,7 +51,6 @@ fun SignUpCard() {
.fillMaxWidth()
.padding(16.dp)
.clip(RoundedCornerShape(16.dp))
- .background((Color(red = 0x2A, green = 0x7D, blue = 0xB9, alpha = 0xFF)))
){
Column(
modifier = Modifier.fillMaxWidth(),
@@ -207,18 +209,25 @@ fun SignUpCard() {
Button(
colors = ButtonDefaults.buttonColors(
- backgroundColor = Color.White,
- contentColor = Color.Black
+ backgroundColor = (colorResource(id = R.color.figma_blue)),
+ contentColor = Color.White
),
onClick = {
},
modifier = Modifier
.fillMaxWidth()
- .padding(16.dp)
+ .padding(16.dp, 16.dp, 16.dp, 0.dp)
+ .height(50.dp)
) {
Text("Sign Up")
}
}
}
+}
+
+@Composable
+@Preview(showBackground = true)
+fun SignUpScreenPreview(){
+ SignUpScreen()
}
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 433080c..37293e5 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -8,5 +8,6 @@
#FF000000
#FFFFFFFF
#F4F4F4
- #3660F6
+ #802A7DB9
+
\ No newline at end of file