Reduce datetime font size

This commit is contained in:
Naveen 2022-10-14 02:01:10 +05:30
parent f721754785
commit 5edb0b099b
3 changed files with 14 additions and 13 deletions

View File

@ -44,9 +44,9 @@ class ScheduleSendDialog(private val activity: BaseSimpleActivity, private var d
private fun updateTexts(dt: DateTime) {
val dateText = dt.toString(DATE_FORMAT_PATTERN).toSpannable()
dateText.setSpan(RelativeSizeSpan(0.6f), 2, dateText.length, 0)
dateText.setSpan(RelativeSizeSpan(0.85f), 2, dateText.length, 0)
val timeText = dt.toString(TIME_FORMAT_12).toSpannable()
timeText.setSpan(RelativeSizeSpan(0.6f), timeText.lastIndex - 2, timeText.length, 0)
timeText.setSpan(RelativeSizeSpan(0.85f), timeText.lastIndex - 2, timeText.length, 0)
view.edit_date.text = dateText
view.edit_time.text = timeText

View File

@ -22,10 +22,10 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/dateIcon"
android:layout_width="@dimen/normal_icon_size"
android:layout_height="@dimen/normal_icon_size"
android:layout_margin="@dimen/activity_margin"
android:padding="@dimen/medium_margin"
android:layout_width="@dimen/date_time_icon_size"
android:layout_height="@dimen/date_time_icon_size"
android:layout_marginStart="@dimen/big_margin"
android:layout_marginTop="@dimen/big_margin"
android:src="@drawable/ic_calendar_month_vector"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/subtitle" />
@ -34,7 +34,7 @@
android:id="@+id/edit_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tiny_margin"
android:layout_marginStart="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:ellipsize="end"
android:includeFontPadding="false"
@ -47,10 +47,10 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/timeIcon"
android:layout_width="@dimen/normal_icon_size"
android:layout_height="@dimen/normal_icon_size"
android:layout_margin="@dimen/activity_margin"
android:padding="@dimen/medium_margin"
android:layout_width="@dimen/date_time_icon_size"
android:layout_height="@dimen/date_time_icon_size"
android:layout_marginStart="@dimen/big_margin"
android:layout_marginTop="@dimen/big_margin"
android:src="@drawable/ic_clock_vector"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/dateIcon" />
@ -59,7 +59,7 @@
android:id="@+id/edit_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/tiny_margin"
android:layout_marginStart="@dimen/medium_margin"
android:background="?attr/selectableItemBackground"
android:ellipsize="end"
android:includeFontPadding="false"

View File

@ -7,6 +7,7 @@
<dimen name="remove_attachment_size">24dp</dimen>
<dimen name="pin_icon_size">15dp</dimen>
<dimen name="vcard_property_start_margin">64dp</dimen>
<dimen name="date_time_text_size">36sp</dimen>
<dimen name="date_time_icon_size">20dp</dimen>
<dimen name="date_time_text_size">22sp</dimen>
<dimen name="small_icon_size">20dp</dimen>
</resources>