diff --git a/app/src/main/java/com/sopt/now/compose/item/FriendItem.kt b/app/src/main/java/com/sopt/now/compose/item/FriendItem.kt index a7224d1..de33f4f 100644 --- a/app/src/main/java/com/sopt/now/compose/item/FriendItem.kt +++ b/app/src/main/java/com/sopt/now/compose/item/FriendItem.kt @@ -9,12 +9,14 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import com.sopt.now.compose.R import com.sopt.now.compose.ui.theme.NOWSOPTAndroidTheme + @Composable fun FriendItem(profile: Profile) { Row( @@ -34,13 +36,16 @@ fun FriendItem(profile: Profile) { text = profile.userName, fontSize = 20.sp, fontWeight = FontWeight.Bold, + maxLines = 1, + overflow = TextOverflow.Ellipsis ) Spacer(modifier = Modifier.weight(1f)) Text( text = profile.userDescription, fontSize = 20.sp, textAlign = TextAlign.End, - maxLines = 1 + maxLines = 1, + overflow = TextOverflow.Ellipsis ) } } diff --git a/app/src/main/java/com/sopt/now/compose/item/UserItem.kt b/app/src/main/java/com/sopt/now/compose/item/UserItem.kt index 823c5cd..8f75cfa 100644 --- a/app/src/main/java/com/sopt/now/compose/item/UserItem.kt +++ b/app/src/main/java/com/sopt/now/compose/item/UserItem.kt @@ -9,6 +9,7 @@ import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.text.style.TextOverflow import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp @@ -34,13 +35,15 @@ fun UserItem(profileData:Profile) { text = profileData.userName, fontSize = 20.sp, fontWeight = FontWeight.Bold, + overflow = TextOverflow.Ellipsis ) Spacer(modifier = Modifier.weight(1f)) Text( text = profileData.userDescription, fontSize = 20.sp, textAlign = TextAlign.End, - maxLines = 1 + maxLines = 1, + overflow = TextOverflow.Ellipsis ) } }