Skip to content

Commit

Permalink
mod/#6: 말 줄임 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
youjin09222 committed May 2, 2024
1 parent 1cc3632 commit eb9441a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion app/src/main/java/com/sopt/now/compose/item/FriendItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
)
}
}
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/java/com/sopt/now/compose/item/UserItem.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
)
}
}
Expand Down

0 comments on commit eb9441a

Please sign in to comment.