Skip to content

Commit

Permalink
update profile and remake an APK
Browse files Browse the repository at this point in the history
  • Loading branch information
fchrgrib committed Jun 16, 2023
1 parent e106822 commit cb1f816
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 19 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -357,11 +357,11 @@ fun BottomPartOfProfile(
) {

if (isEditButtonClicked){
TextFieldProfile(placeHolder = "User Name", content = {userNameContent(it)}, firstContent = userName)
TextFieldProfile(label = "User Name", content = {userNameContent(it)}, firstContent = userName)
Spacer(modifier = Modifier.padding(top = 16.dp))
TextFieldProfile(placeHolder = "Phone", content = {phoneNumberContent(it)}, firstContent = phoneNumber)
TextFieldProfile(label = "Phone", content = {phoneNumberContent(it)}, firstContent = phoneNumber)
Spacer(modifier = Modifier.padding(top = 16.dp))
TextFieldProfile(placeHolder = "Email", content = {emailContent(it)}, firstContent = email)
TextFieldProfile(label = "Email", content = {emailContent(it)}, firstContent = email)
}else {
BoxContent(startText = "Phone", endText = phoneNumber)
BoxContent(startText = "Email", endText = email)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,9 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import coil.compose.AsyncImage
import com.example.wallpapercollect.R
import com.example.wallpapercollect.presentation.ui.theme.brand500
import com.example.wallpapercollect.presentation.ui.theme.gray10
import com.example.wallpapercollect.presentation.ui.theme.gray100
import com.example.wallpapercollect.presentation.ui.theme.gray200
import com.example.wallpapercollect.presentation.ui.theme.interFont

@Composable
fun BoxContent(startText :String, endText:String) {
Expand Down Expand Up @@ -113,9 +112,9 @@ fun PhotoProfileCustom(

@Composable
fun TextFieldProfile(
placeHolder:String,
content : (String) -> Unit,
firstContent:String
label:String,
content : (String) -> Unit,
firstContent:String
) {
var text by rememberSaveable {
mutableStateOf(firstContent)
Expand All @@ -131,23 +130,15 @@ fun TextFieldProfile(
.fillMaxWidth()
.height(56.dp)
.border(1.dp, gray10, RoundedCornerShape(10.dp)),
placeholder = {
Text(
text = placeHolder,
fontFamily = interFont,
fontWeight = FontWeight.Normal,
color = gray100,
fontSize = 12.sp
)
},
singleLine = true,
colors = TextFieldDefaults.colors(
unfocusedContainerColor = Color(0xFFF7F8F9),
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
disabledTextColor = gray200
disabledTextColor = gray200,
focusedLabelColor = brand500
),
shape = RoundedCornerShape(10.dp),
label = { Text(text = placeHolder)}
label = { Text(text = label)}
)
}

0 comments on commit cb1f816

Please sign in to comment.