diff --git a/app/src/main/java/com/example/belindas_closet/Routes.kt b/app/src/main/java/com/example/belindas_closet/Routes.kt index 42eb58a..4911292 100644 --- a/app/src/main/java/com/example/belindas_closet/Routes.kt +++ b/app/src/main/java/com/example/belindas_closet/Routes.kt @@ -15,4 +15,6 @@ sealed class Routes (val route: String) { object CreatorView: Routes("Creator_View") object EditUserRole: Routes("Edit User Role") object DonationInfo: Routes("Donation_Info") -} \ No newline at end of file + object ContactUs: Routes("Contact_Us") + +} diff --git a/app/src/main/java/com/example/belindas_closet/screen/ContactUs.kt b/app/src/main/java/com/example/belindas_closet/screen/ContactUs.kt new file mode 100644 index 0000000..80065a3 --- /dev/null +++ b/app/src/main/java/com/example/belindas_closet/screen/ContactUs.kt @@ -0,0 +1,71 @@ +package com.example.belindas_closet.screen + +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.foundation.layout.* +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.ArrowBack +import androidx.compose.material.icons.filled.Menu +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.Text +import androidx.compose.material3.TopAppBar +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.stringResource +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.navigation.NavController +import com.example.belindas_closet.R +import com.example.belindas_closet.Routes + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun ContactUsPage(navController: NavController) { + /* Top app bar with navigation back to Home page */ + TopAppBar( + title = { Text("Home") }, + navigationIcon = { + IconButton( + onClick = { + navController.navigate(Routes.Home.route) + } + ) { + Icon(imageVector = Icons.Default.ArrowBack, contentDescription = "Back") + } + }, + actions = { + IconButton( + onClick = { + } + ) { + Icon(imageVector = Icons.Default.Menu, contentDescription = "Menu") + } + } + ) + + Column( + modifier = Modifier.fillMaxSize(), + verticalArrangement = Arrangement.Top, + ) { + Column( + horizontalAlignment = Alignment.CenterHorizontally, + modifier = Modifier.fillMaxWidth() + ) { + Spacer(modifier = Modifier.height(75.dp)) + Text( + text = stringResource(id = R.string.contact_us), + style = TextStyle( + fontSize = 30.sp, + fontWeight = FontWeight.Light, + color = if (isSystemInDarkTheme()) Color.White else Color.Black + ), + modifier = Modifier.wrapContentSize() + ) + } + } +} diff --git a/app/src/main/java/com/example/belindas_closet/screen/DonationInfo.kt b/app/src/main/java/com/example/belindas_closet/screen/DonationInfo.kt index a9de3f2..274e4cb 100644 --- a/app/src/main/java/com/example/belindas_closet/screen/DonationInfo.kt +++ b/app/src/main/java/com/example/belindas_closet/screen/DonationInfo.kt @@ -33,7 +33,7 @@ import com.example.belindas_closet.Routes @Composable fun DonationInfoPage(navController: NavController) { - /* Back arrow that navigates back to Home page */ + /* Back arrow that navigataes back to Home page */ TopAppBar( title = { Text("Home") }, navigationIcon = { diff --git a/app/src/main/java/com/example/belindas_closet/screen/Home.kt b/app/src/main/java/com/example/belindas_closet/screen/Home.kt index a0c6961..14c403e 100644 --- a/app/src/main/java/com/example/belindas_closet/screen/Home.kt +++ b/app/src/main/java/com/example/belindas_closet/screen/Home.kt @@ -13,7 +13,10 @@ import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Call import androidx.compose.material.icons.filled.Menu +import androidx.compose.material.icons.filled.Person +import androidx.compose.material.icons.filled.Phone import androidx.compose.material3.Button import androidx.compose.material3.Card import androidx.compose.material3.ExperimentalMaterial3Api @@ -62,21 +65,36 @@ fun HomePage(navController: NavController) { onClick = { navController.navigate(Routes.DonationInfo.route) } - ) { + ) + { Icon( painter = painterResource(R.drawable.info_icon), contentDescription = "Donation Info page", modifier = Modifier.padding(10.dp) ) } + IconButton( + onClick = { + navController.navigate(Routes.ContactUs.route) + } + ) + { + Icon( + imageVector = Icons.Filled.Call, // Use the ContactSupport icon + contentDescription = "Contact Us page", + modifier = Modifier.padding(10.dp) + ) + } IconButton( onClick = { } ) { Icon(imageVector = Icons.Default.Menu, contentDescription = "Menu") } + }, ) + Row( modifier = Modifier .size(75.dp) diff --git a/app/src/main/java/com/example/belindas_closet/screen/ScreenMain.kt b/app/src/main/java/com/example/belindas_closet/screen/ScreenMain.kt index 986ce79..256c1b4 100644 --- a/app/src/main/java/com/example/belindas_closet/screen/ScreenMain.kt +++ b/app/src/main/java/com/example/belindas_closet/screen/ScreenMain.kt @@ -48,6 +48,10 @@ fun ScreenMain() { composable(Routes.DonationInfo.route) { DonationInfoPage(navController = navController) } + composable(Routes.ContactUs.route) { + ContactUsPage(navController = navController) + } + composable(Routes.CreatorView.route) { CreatorView(navController = navController) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e049dad..0b31ff8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -79,6 +79,9 @@ <!-- DonationInfo Screen Strings --> <string name="donation_info">Donation Info</string> + <!-- ContactUS Screen Strings --> + <string name="contact_us">Contact Us</string> + <!-- Change Password Screen Strings --> <string name="change_password_title">Change Password</string> <string name="change_new_password_label">New Password</string> @@ -91,4 +94,4 @@ <!-- Edit User Role Strings --> <string name="edit_user_role_title">User Role Manager</string> -</resources> \ No newline at end of file +</resources>