Skip to content

Commit

Permalink
Merge branch 'main' into feature-271-create-profile-dropdown-01
Browse files Browse the repository at this point in the history
  • Loading branch information
heosman authored Apr 24, 2024
2 parents 55f1067 + d2b2c95 commit 1363f45
Show file tree
Hide file tree
Showing 6 changed files with 101 additions and 4 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/com/example/belindas_closet/Routes.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ sealed class Routes (val route: String) {
object EditUserRole: Routes("Edit User Role")
object DonationInfo: Routes("Donation_Info")
object Dashboard: Routes("Dashboard")
}
object ContactUs: Routes("Contact_Us")
}
71 changes: 71 additions & 0 deletions app/src/main/java/com/example/belindas_closet/screen/ContactUs.kt
Original file line number Diff line number Diff line change
@@ -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()
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import com.example.belindas_closet.data.network.dto.auth_dto.Role
fun DonationInfoPage(navController: NavController) {
var profileDropdownState by remember { mutableStateOf(DrawerValue.Closed) }

/* Back arrow that navigates back to Home page */
/* Back arrow that navigataes back to Home page */
TopAppBar(
title = { Text("Home") },
navigationIcon = {
Expand Down
20 changes: 19 additions & 1 deletion app/src/main/java/com/example/belindas_closet/screen/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.AccountCircle
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.DrawerValue
Expand Down Expand Up @@ -72,7 +75,8 @@ fun HomePage(navController: NavController) {
onClick = {
navController.navigate(Routes.DonationInfo.route)
}
) {
)
{
Icon(
painter = painterResource(R.drawable.info_icon),
contentDescription = "Donation Info page",
Expand All @@ -99,14 +103,28 @@ fun HomePage(navController: NavController) {
}
}
}
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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -91,4 +94,4 @@

<!-- Edit User Role Strings -->
<string name="edit_user_role_title">User Role Manager</string>
</resources>
</resources>

0 comments on commit 1363f45

Please sign in to comment.