Skip to content

Commit

Permalink
v.14.10.2. #144 "All in one row" layout of Event entry improved.
Browse files Browse the repository at this point in the history
  • Loading branch information
yvolk committed Dec 14, 2024
1 parent 51536d8 commit 53d8ec2
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 29 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## [Todo Agenda](https://github.com/andstatus/todoagenda#readme) Changelog

<a id="v4.10"/>

### 2024-12-14 v4.10.2 Text shadow and Event description
* "All in one row" layout of Event entry improved. By default each entry is really in one row now.
In order to make time column multiline (as it was in previous version of the widget),
please set "Multiline details" option.
[#144](https://github.com/andstatus/todoagenda/issues/144)
* Updated for Android 15.

<a id="v4.9"/>

### 2024-01-08 v4.9.0 Text shadow and Event description
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
}

defaultConfig {
versionCode 707
versionName '4.10.1'
versionCode 708
versionName '4.10.2'
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ ${toJson()}"""
const val PREF_EVENT_ENTRY_LAYOUT = "eventEntryLayout"
const val PREF_SHOW_EVENT_ICON = "showEventIcon"
const val PREF_ENTRY_DATE_FORMAT = "entryDateFormat"
val PREF_ENTRY_DATE_FORMAT_DEFAULT: DateFormatValue = DateFormatType.NUMBER_OF_DAYS.defaultValue
val PREF_ENTRY_DATE_FORMAT_DEFAULT: DateFormatValue = DateFormatType.HIDDEN.defaultValue

@Deprecated("")
private val PREF_SHOW_NUMBER_OF_DAYS_TO_EVENT = "showNumberOfDaysToEvent" // till v 4.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ object RemoteViewsUtil {
private const val METHOD_SET_ALPHA = "setAlpha"
private const val METHOD_SET_COLOR_FILTER = "setColorFilter"
private const val METHOD_SET_WIDTH = "setWidth"
private const val METHOD_SET_MIN_WIDTH = "setMinWidth"
private const val METHOD_SET_HEIGHT = "setHeight"
private const val METHOD_SET_PAINT_FLAGS = "setPaintFlags"
fun setPadding(
Expand All @@ -46,6 +47,10 @@ object RemoteViewsUtil {
rv.setInt(viewId, METHOD_SET_WIDTH, getScaledValueInPixels(settings, dimenId))
}

fun setViewMinWidth(settings: InstanceSettings, rv: RemoteViews, viewId: Int, dimenId: Int) {
rv.setInt(viewId, METHOD_SET_MIN_WIDTH, getScaledValueInPixels(settings, dimenId))
}

fun setViewHeight(settings: InstanceSettings, rv: RemoteViews, viewId: Int, dimenId: Int) {
rv.setInt(viewId, METHOD_SET_HEIGHT, getScaledValueInPixels(settings, dimenId))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,14 @@ abstract class WidgetEntryVisualizer<T : WidgetEntry<T>>(protected val eventProv
protected fun setTime(entry: WidgetEntry<*>, rv: RemoteViews) {
if (settings.eventEntryLayout == EventEntryLayout.DEFAULT) return
val viewId = R.id.event_entry_time
RemoteViewsUtil.setMultiline(rv, viewId, settings.showEndTime)
RemoteViewsUtil.setMultiline(rv, viewId, settings.isMultilineDetails)
rv.setTextViewText(viewId, entry.eventTimeString.replace(CalendarEntry.SPACE_DASH_SPACE, "\n"))
RemoteViewsUtil.setViewWidth(settings, rv, viewId, R.dimen.event_time_width)
if (settings.isMultilineDetails) {
RemoteViewsUtil.setViewWidth(settings, rv, viewId, R.dimen.event_time_width)
RemoteViewsUtil.setMaxLines(rv, viewId, settings.maxLinesDetails)
} else {
RemoteViewsUtil.setViewMinWidth(settings, rv, viewId, R.dimen.event_time_width)
}
RemoteViewsUtil.setTextSize(settings, rv, viewId, R.dimen.event_entry_details)
RemoteViewsUtil.setTextColor(
settings,
Expand Down
11 changes: 1 addition & 10 deletions app/src/main/play/release-notes/en-US/default.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
v4.9.0. "Text shadow" option added to Colors section: "No shadow", "Dark shadow" and "Light shadow"
Event details -> "Description" option added to show Calendar event Description.
Added settings to limit maximum number of lines for an event's title and for details.
v4.8.0. Fixed "Default Time zone in app doesn't change, when Android System Time Zone changes".
Fixed "Do not make all permissions mandatory".
App converted from Java to Kotlin.
v4.7.3. Filter for Today and Tomorrow.
Show based on keywords in a title.
Allow changing language of User Interface for Android 13+

v4.10.2. "All in one row" layout of Event entry improved. Updated for Android 15.
14 changes: 2 additions & 12 deletions app/src/main/play/release-notes/ru-RU/default.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@
v4.9.0. В раздел «Цвета» добавлена опция «Тень текста» со значениями: «Нет тени», «Тёмная тень» и «Светлая тень».
В "Сведения о событии" добавлена опция «Описание», чтобы отобразить описание события календаря.
Добавлены настройки для ограничения максимального количества строк для названия события и для подробностей
(т.е. для времени, местоположения и описания события).

v4.8.0. Исправлено: Часовой пояс в виджете не менялся до перезапуска приложения.
Исправлено: Не надо делать все разрешения обязательными.
Приложение сконвертировано с Java на Kotlin. Это может быть интересно программистам :-)

v4.7.3. Фильтр "Сегодня и завтра".
Показать только при начичии ключевых слов в названии.
Изменение языка интерфейса для Android 13+
v4.10.2. Макет Элемента списка событий "Всё - в один ряд" усовершенствован.
Обновление до Android 15.
4 changes: 2 additions & 2 deletions app/src/main/res/values/dimens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<dimen name="event_entry_details">14dp</dimen>
<dimen name="days_to_event_right_width">50dp</dimen>
<dimen name="days_to_event_width">53dp</dimen>
<dimen name="event_time_width">46dp</dimen>
<dimen name="event_time_width">47dp</dimen>
<dimen name="event_indicator_size">24dp</dimen>
<dimen name="entry_bottom_padding">2dp</dimen>
<dimen name="day_header_padding_left">12dp</dimen>
Expand All @@ -22,4 +22,4 @@
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>

</resources>
</resources>

0 comments on commit 53d8ec2

Please sign in to comment.