adding content descriptions to some views

This commit is contained in:
tibbi 2019-02-22 23:30:21 +01:00
parent c402a68100
commit 72dc83ba1c
4 changed files with 5 additions and 0 deletions

View File

@ -408,6 +408,7 @@ fun Context.addDayEvents(day: DayMonthly, linearLayout: LinearLayout, res: Resou
text = it.title.replace(" ", "\u00A0") // allow word break by char
background = backgroundDrawable
layoutParams = eventLayoutParams
contentDescription = it.title
linearLayout.addView(this)
}
}

View File

@ -81,6 +81,7 @@ class DayFragment : Fragment() {
val day = Formatter.getDayTitle(context!!, mDayCode)
mHolder.top_value.apply {
text = day
contentDescription = text
setOnClickListener { pickDay() }
setTextColor(context.config.textColor)
}

View File

@ -100,6 +100,7 @@ class MonthFragment : Fragment(), MonthlyCalendar {
activity?.runOnUiThread {
mHolder.top_value.apply {
text = month
contentDescription = text
setTextColor(mConfig.textColor)
}
updateDays(days)

View File

@ -322,6 +322,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
background = ColorDrawable(backgroundColor)
setTextColor(textColor)
text = event.title
contentDescription = text
layout.addView(this)
y = startMinutes * minuteHeight
(layoutParams as RelativeLayout.LayoutParams).apply {
@ -406,6 +407,7 @@ class WeekFragment : Fragment(), WeeklyCalendar {
setTextColor(textColor)
text = event.title
contentDescription = text
val startDateTime = Formatter.getDateTimeFromTS(event.startTS)
val endDateTime = Formatter.getDateTimeFromTS(event.endTS)