updating Commons to the new vector icons

This commit is contained in:
tibbi 2019-08-14 22:53:25 +02:00
parent 55d8c63b8c
commit 1a7a4eb1d5
20 changed files with 33 additions and 33 deletions

View File

@ -57,7 +57,7 @@ android {
} }
dependencies { dependencies {
implementation 'com.simplemobiletools:commons:5.15.23' implementation 'com.simplemobiletools:commons:5.16.7'
implementation 'joda-time:joda-time:2.10.1' implementation 'joda-time:joda-time:2.10.1'
implementation 'androidx.multidex:multidex:2.0.1' implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2' implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'

View File

@ -95,7 +95,7 @@ class EventActivity : SimpleActivity() {
return return
} }
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_cross) supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_cross_vector)
val intent = intent ?: return val intent = intent ?: return
mDialogTheme = getDialogTheme() mDialogTheme = getDialogTheme()
mWasContactsPermissionChecked = hasPermission(PERMISSION_READ_CONTACTS) mWasContactsPermissionChecked = hasPermission(PERMISSION_READ_CONTACTS)
@ -716,7 +716,7 @@ class EventActivity : SimpleActivity() {
private fun updateReminderTypeImage(view: ImageView, reminder: Reminder) { private fun updateReminderTypeImage(view: ImageView, reminder: Reminder) {
view.beVisibleIf(reminder.minutes != REMINDER_OFF && mEventCalendarId != STORED_LOCALLY_ONLY) view.beVisibleIf(reminder.minutes != REMINDER_OFF && mEventCalendarId != STORED_LOCALLY_ONLY)
val drawable = if (reminder.type == REMINDER_NOTIFICATION) R.drawable.ic_bell else R.drawable.ic_email val drawable = if (reminder.type == REMINDER_NOTIFICATION) R.drawable.ic_bell_vector else R.drawable.ic_email_vector
val icon = resources.getColoredDrawableWithColor(drawable, config.textColor) val icon = resources.getColoredDrawableWithColor(drawable, config.textColor)
view.setImageDrawable(icon) view.setImageDrawable(icon)
} }

View File

@ -257,7 +257,7 @@ fun Context.getNotification(pendingIntent: PendingIntent, event: Event, content:
.setAutoCancel(true) .setAutoCancel(true)
.setSound(Uri.parse(soundUri), config.reminderAudioStream) .setSound(Uri.parse(soundUri), config.reminderAudioStream)
.setChannelId(channelId) .setChannelId(channelId)
.addAction(R.drawable.ic_snooze, getString(R.string.snooze), getSnoozePendingIntent(this, event)) .addAction(R.drawable.ic_snooze_vector, getString(R.string.snooze), getSnoozePendingIntent(this, event))
if (config.vibrateOnReminder) { if (config.vibrateOnReminder) {
val vibrateArray = LongArray(2) { 500 } val vibrateArray = LongArray(2) { 500 }

View File

@ -44,7 +44,7 @@ class MyWidgetListProvider : AppWidgetProvider() {
val todayText = Formatter.getLongestDate(getNowSeconds()) val todayText = Formatter.getLongestDate(getNowSeconds())
views.setText(R.id.widget_event_list_today, todayText) views.setText(R.id.widget_event_list_today, todayText)
views.setImageViewBitmap(R.id.widget_event_new_event, context.resources.getColoredBitmap(R.drawable.ic_plus, textColor)) views.setImageViewBitmap(R.id.widget_event_new_event, context.resources.getColoredBitmap(R.drawable.ic_plus_vector, textColor))
setupIntent(context, views, NEW_EVENT, R.id.widget_event_new_event) setupIntent(context, views, NEW_EVENT, R.id.widget_event_new_event)
setupIntent(context, views, LAUNCH_CAL, R.id.widget_event_list_today) setupIntent(context, views, LAUNCH_CAL, R.id.widget_event_list_today)

View File

@ -181,7 +181,7 @@ class MyWidgetMonthlyProvider : AppWidgetProvider() {
bmp = resources.getColoredBitmap(R.drawable.ic_today, textColor) bmp = resources.getColoredBitmap(R.drawable.ic_today, textColor)
views.setImageViewBitmap(R.id.top_go_to_today, bmp) views.setImageViewBitmap(R.id.top_go_to_today, bmp)
bmp = resources.getColoredBitmap(R.drawable.ic_plus, textColor) bmp = resources.getColoredBitmap(R.drawable.ic_plus_vector, textColor)
views.setImageViewBitmap(R.id.top_new_event, bmp) views.setImageViewBitmap(R.id.top_new_event, bmp)
val shouldGoToTodayBeVisible = currTargetDate.withTime(0, 0, 0, 0) != DateTime.now().withDayOfMonth(1).withTime(0, 0, 0, 0) val shouldGoToTodayBeVisible = currTargetDate.withTime(0, 0, 0, 0) != DateTime.now().withDayOfMonth(1).withTime(0, 0, 0, 0)

View File

@ -8,7 +8,7 @@
<item <item
android:bottom="@dimen/medium_margin" android:bottom="@dimen/medium_margin"
android:drawable="@drawable/ic_person" android:drawable="@drawable/ic_person_vector"
android:left="@dimen/medium_margin" android:left="@dimen/medium_margin"
android:right="@dimen/medium_margin" android:right="@dimen/medium_margin"
android:top="@dimen/medium_margin"/> android:top="@dimen/medium_margin"/>

View File

@ -18,7 +18,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"
android:layout_margin="@dimen/activity_margin" android:layout_margin="@dimen/activity_margin"
android:src="@drawable/ic_plus" android:src="@drawable/ic_plus_vector"
app:backgroundTint="@color/color_primary" app:backgroundTint="@color/color_primary"
app:rippleColor="@color/pressed_item_foreground"/> app:rippleColor="@color/pressed_item_foreground"/>

View File

@ -54,7 +54,7 @@
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:paddingStart="@dimen/small_margin" android:paddingStart="@dimen/small_margin"
android:paddingEnd="@dimen/small_margin" android:paddingEnd="@dimen/small_margin"
android:src="@drawable/ic_place"/> android:src="@drawable/ic_place_vector"/>
<com.simplemobiletools.commons.views.MyEditText <com.simplemobiletools.commons.views.MyEditText
android:id="@+id/event_description" android:id="@+id/event_description"
@ -92,7 +92,7 @@
android:layout_alignBottom="@+id/event_all_day" android:layout_alignBottom="@+id/event_all_day"
android:layout_marginStart="@dimen/normal_margin" android:layout_marginStart="@dimen/normal_margin"
android:padding="@dimen/medium_margin" android:padding="@dimen/medium_margin"
android:src="@drawable/ic_clock"/> android:src="@drawable/ic_clock_vector"/>
<com.simplemobiletools.commons.views.MySwitchCompat <com.simplemobiletools.commons.views.MySwitchCompat
android:id="@+id/event_all_day" android:id="@+id/event_all_day"
@ -176,7 +176,7 @@
android:layout_alignBottom="@+id/event_reminder_1" android:layout_alignBottom="@+id/event_reminder_1"
android:layout_marginStart="@dimen/normal_margin" android:layout_marginStart="@dimen/normal_margin"
android:padding="@dimen/medium_margin" android:padding="@dimen/medium_margin"
android:src="@drawable/ic_bell"/> android:src="@drawable/ic_bell_vector"/>
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_reminder_1" android:id="@+id/event_reminder_1"
@ -204,7 +204,7 @@
android:layout_marginStart="@dimen/small_margin" android:layout_marginStart="@dimen/small_margin"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin" android:padding="@dimen/activity_margin"
android:src="@drawable/ic_bell"/> android:src="@drawable/ic_bell_vector"/>
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_reminder_2" android:id="@+id/event_reminder_2"
@ -234,7 +234,7 @@
android:layout_marginStart="@dimen/small_margin" android:layout_marginStart="@dimen/small_margin"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin" android:padding="@dimen/activity_margin"
android:src="@drawable/ic_bell"/> android:src="@drawable/ic_bell_vector"/>
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_reminder_3" android:id="@+id/event_reminder_3"
@ -264,7 +264,7 @@
android:layout_marginStart="@dimen/small_margin" android:layout_marginStart="@dimen/small_margin"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:padding="@dimen/activity_margin" android:padding="@dimen/activity_margin"
android:src="@drawable/ic_bell"/> android:src="@drawable/ic_bell_vector"/>
<ImageView <ImageView
android:id="@+id/event_reminder_divider" android:id="@+id/event_reminder_divider"
@ -285,7 +285,7 @@
android:layout_alignBottom="@+id/event_repetition" android:layout_alignBottom="@+id/event_repetition"
android:layout_marginStart="@dimen/normal_margin" android:layout_marginStart="@dimen/normal_margin"
android:padding="@dimen/medium_margin" android:padding="@dimen/medium_margin"
android:src="@drawable/ic_repeat"/> android:src="@drawable/ic_repeat_vector"/>
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_repetition" android:id="@+id/event_repetition"

View File

@ -25,7 +25,7 @@
android:layout_gravity="bottom|end" android:layout_gravity="bottom|end"
android:layout_margin="@dimen/activity_margin" android:layout_margin="@dimen/activity_margin"
android:contentDescription="@string/new_event" android:contentDescription="@string/new_event"
android:src="@drawable/ic_plus" android:src="@drawable/ic_plus_vector"
app:backgroundTint="@color/color_primary" app:backgroundTint="@color/color_primary"
app:rippleColor="@color/pressed_item_foreground"/> app:rippleColor="@color/pressed_item_foreground"/>

View File

@ -17,7 +17,7 @@
android:layout_marginStart="@dimen/normal_margin" android:layout_marginStart="@dimen/normal_margin"
android:alpha="0.8" android:alpha="0.8"
android:padding="@dimen/medium_margin" android:padding="@dimen/medium_margin"
android:src="@drawable/ic_bell"/> android:src="@drawable/ic_bell_vector"/>
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/set_reminders_1" android:id="@+id/set_reminders_1"

View File

@ -66,7 +66,7 @@
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:paddingStart="@dimen/medium_margin" android:paddingStart="@dimen/medium_margin"
android:paddingEnd="@dimen/medium_margin" android:paddingEnd="@dimen/medium_margin"
android:src="@drawable/ic_plus"/> android:src="@drawable/ic_plus_vector"/>
<include <include
android:id="@+id/first_row_widget" android:id="@+id/first_row_widget"

View File

@ -73,7 +73,7 @@
android:alpha="0.8" android:alpha="0.8"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/small_margin" android:padding="@dimen/small_margin"
android:src="@drawable/ic_cross_big"/> android:src="@drawable/ic_cross_vector"/>
<com.simplemobiletools.commons.views.MyTextView <com.simplemobiletools.commons.views.MyTextView
android:id="@+id/event_contact_me_status" android:id="@+id/event_contact_me_status"

View File

@ -5,4 +5,4 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:scaleType="centerInside" android:scaleType="centerInside"
android:src="@drawable/ic_plus"/> android:src="@drawable/ic_plus_vector"/>

View File

@ -47,7 +47,7 @@
android:paddingEnd="@dimen/medium_margin" android:paddingEnd="@dimen/medium_margin"
android:paddingBottom="@dimen/small_margin" android:paddingBottom="@dimen/small_margin"
android:scaleType="fitCenter" android:scaleType="fitCenter"
android:src="@drawable/ic_plus"/> android:src="@drawable/ic_plus_vector"/>
<ListView <ListView
android:id="@+id/widget_event_list" android:id="@+id/widget_event_list"

View File

@ -3,12 +3,12 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/cab_share" android:id="@+id/cab_share"
android:icon="@drawable/ic_share" android:icon="@drawable/ic_share_vector"
android:title="@string/share" android:title="@string/share"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/cab_delete" android:id="@+id/cab_delete"
android:icon="@drawable/ic_delete" android:icon="@drawable/ic_delete_vector"
android:title="@string/delete" android:title="@string/delete"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
</menu> </menu>

View File

@ -3,12 +3,12 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/cab_share" android:id="@+id/cab_share"
android:icon="@drawable/ic_share" android:icon="@drawable/ic_share_vector"
android:title="@string/share" android:title="@string/share"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/cab_delete" android:id="@+id/cab_delete"
android:icon="@drawable/ic_delete" android:icon="@drawable/ic_delete_vector"
android:title="@string/delete" android:title="@string/delete"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
</menu> </menu>

View File

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/cab_delete" android:id="@+id/cab_delete"
android:icon="@drawable/ic_delete" android:icon="@drawable/ic_delete_vector"
android:title="@string/delete" android:title="@string/delete"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
</menu> </menu>

View File

@ -3,12 +3,12 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/save" android:id="@+id/save"
android:icon="@drawable/ic_check" android:icon="@drawable/ic_check_vector"
android:title="@string/save" android:title="@string/save"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/delete" android:id="@+id/delete"
android:icon="@drawable/ic_delete" android:icon="@drawable/ic_delete_vector"
android:title="@string/delete" android:title="@string/delete"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
@ -18,7 +18,7 @@
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/share" android:id="@+id/share"
android:icon="@drawable/ic_share" android:icon="@drawable/ic_share_vector"
android:title="@string/share" android:title="@string/share"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
</menu> </menu>

View File

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/add_event_type" android:id="@+id/add_event_type"
android:icon="@drawable/ic_plus" android:icon="@drawable/ic_plus_vector"
android:title="@string/add_new_type" android:title="@string/add_new_type"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
</menu> </menu>

View File

@ -3,7 +3,7 @@
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<item <item
android:id="@+id/search" android:id="@+id/search"
android:icon="@drawable/ic_search" android:icon="@drawable/ic_search_vector"
android:title="@string/search" android:title="@string/search"
app:actionViewClass="androidx.appcompat.widget.SearchView" app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="collapseActionView|ifRoom"/> app:showAsAction="collapseActionView|ifRoom"/>
@ -19,12 +19,12 @@
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/filter" android:id="@+id/filter"
android:icon="@drawable/ic_filter" android:icon="@drawable/ic_filter_vector"
android:title="@string/filter_events_by_type" android:title="@string/filter_events_by_type"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item
android:id="@+id/refresh_caldav_calendars" android:id="@+id/refresh_caldav_calendars"
android:icon="@drawable/ic_repeat" android:icon="@drawable/ic_repeat_vector"
android:title="@string/refresh_caldav_calendars" android:title="@string/refresh_caldav_calendars"
app:showAsAction="ifRoom"/> app:showAsAction="ifRoom"/>
<item <item