@@ -13,7 +13,6 @@ import android.text.Editable
1313import android.text.Spanned
1414import android.text.style.URLSpan
1515import android.util.Log
16- import android.util.TypedValue
1716import android.view.MenuItem
1817import android.view.View
1918import android.view.View.GONE
@@ -57,6 +56,7 @@ import com.philkes.notallyx.presentation.isLightColor
5756import com.philkes.notallyx.presentation.setCancelButton
5857import com.philkes.notallyx.presentation.setControlsContrastColorForAllViews
5958import com.philkes.notallyx.presentation.setLightStatusAndNavBar
59+ import com.philkes.notallyx.presentation.setTextSizeSp
6060import com.philkes.notallyx.presentation.setupProgressDialog
6161import com.philkes.notallyx.presentation.setupReminderChip
6262import com.philkes.notallyx.presentation.showKeyboard
@@ -74,6 +74,9 @@ import com.philkes.notallyx.presentation.viewmodel.preference.EditAction
7474import com.philkes.notallyx.presentation.viewmodel.preference.ListItemSort
7575import com.philkes.notallyx.presentation.viewmodel.preference.NotallyXPreferences
7676import com.philkes.notallyx.presentation.viewmodel.preference.NotesSortBy
77+ import com.philkes.notallyx.presentation.viewmodel.preference.displaySmallerSize
78+ import com.philkes.notallyx.presentation.viewmodel.preference.editBodySize
79+ import com.philkes.notallyx.presentation.viewmodel.preference.editTitleSize
7780import com.philkes.notallyx.presentation.widget.WidgetProvider
7881import com.philkes.notallyx.utils.FileError
7982import com.philkes.notallyx.utils.changeStatusAndNavigationBarColor
@@ -671,7 +674,10 @@ abstract class EditActivity(private val type: Type) : LockedActivity<ActivityEdi
671674 if (preferences.applyDateFormatInNoteView.value) {
672675 preferences.dateFormat.value
673676 } else DateFormat .ABSOLUTE
674- binding.Date .displayFormattedTimestamp(date, dateFormat, datePrefixResId)
677+ binding.Date .apply {
678+ displayFormattedTimestamp(date, dateFormat, datePrefixResId)
679+ setTextSizeSp(notallyModel.textSize.displaySmallerSize)
680+ }
675681 binding.EnterTitle .setText(notallyModel.title)
676682 bindLabels()
677683 setColor()
@@ -925,13 +931,9 @@ abstract class EditActivity(private val type: Type) : LockedActivity<ActivityEdi
925931 }
926932 }
927933
928- val title = notallyModel.textSize.editTitleSize
929- val date = notallyModel.textSize.displayBodySize
930- val body = notallyModel.textSize.editBodySize
931-
932- binding.EnterTitle .setTextSize(TypedValue .COMPLEX_UNIT_SP , title)
933- binding.Date .setTextSize(TypedValue .COMPLEX_UNIT_SP , date)
934- binding.EnterBody .setTextSize(TypedValue .COMPLEX_UNIT_SP , body)
934+ binding.EnterTitle .setTextSizeSp(notallyModel.textSize.editTitleSize)
935+ binding.Date .setTextSizeSp(notallyModel.textSize.displaySmallerSize)
936+ binding.EnterBody .setTextSizeSp(notallyModel.textSize.editBodySize)
935937
936938 setupImages()
937939 setupFiles()
@@ -979,7 +981,10 @@ abstract class EditActivity(private val type: Type) : LockedActivity<ActivityEdi
979981
980982 fun setupEditNoteReminderChip () {
981983 notallyModel.originalNote?.let { note ->
982- binding.EditNoteReminderChip .setupReminderChip(note)
984+ binding.EditNoteReminderChip .setupReminderChip(
985+ note,
986+ notallyModel.textSize.displaySmallerSize,
987+ )
983988 binding.EditNoteReminderChip .setOnClickListener {
984989 val intent =
985990 Intent (this @EditActivity, RemindersActivity ::class .java)
0 commit comments