Skip to content

Commit

Permalink
fix: #447 use sp instead
Browse files Browse the repository at this point in the history
  • Loading branch information
plateaukao committed Dec 13, 2024
1 parent 55b6760 commit e30b982
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ import info.plateaukao.einkbro.R
import info.plateaukao.einkbro.database.BookmarkManager
import info.plateaukao.einkbro.database.Record
import info.plateaukao.einkbro.database.RecordType
import info.plateaukao.einkbro.unit.ViewUnit
import info.plateaukao.einkbro.view.dialog.compose.toScreenPoint
import java.text.SimpleDateFormat
import java.util.Locale
Expand Down Expand Up @@ -141,7 +140,7 @@ private fun RecordItem(
AndroidView(
factory = { context ->
TextView(context).apply {
textSize = ViewUnit.dpToPixel(11).toFloat()
textSize = 16.sp.value.toFloat()
maxLines = 1
ellipsize = TextUtils.TruncateAt.MIDDLE
}
Expand All @@ -158,7 +157,7 @@ private fun RecordItem(
.align(Alignment.Top),
factory = { context ->
TextView(context).apply {
textSize = ViewUnit.dpToPixel(8).toFloat()
textSize = 12.sp.value.toFloat()
textAlignment = TextView.TEXT_ALIGNMENT_CENTER
maxLines = 1
ellipsize = TextUtils.TruncateAt.MIDDLE
Expand Down

0 comments on commit e30b982

Please sign in to comment.