From 4a37bfcaeeb527c1e8ed053cb89e95b99d888d96 Mon Sep 17 00:00:00 2001 From: Paul Akhamiogu Date: Mon, 13 Sep 2021 22:30:45 +0100 Subject: [PATCH 01/34] Make the projection argument nullable in Context.queryCursor extension method --- .../kotlin/com/simplemobiletools/commons/extensions/Context.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt index f402a594e..00b0d5a47 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt @@ -338,7 +338,7 @@ fun Context.getMediaContent(path: String, uri: Uri): Uri? { fun Context.queryCursor( uri: Uri, - projection: Array, + projection: Array? = null, selection: String? = null, selectionArgs: Array? = null, sortOrder: String? = null, From f49f7b5f89da524433625dbb484889bbbc6b3b97 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 15 Sep 2021 11:10:04 +0200 Subject: [PATCH 02/34] adding a crashfix at selecting alarms --- .../commons/dialogs/SelectAlarmSoundDialog.kt | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SelectAlarmSoundDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SelectAlarmSoundDialog.kt index 941285aab..44a5bce84 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SelectAlarmSoundDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/SelectAlarmSoundDialog.kt @@ -1,5 +1,6 @@ package com.simplemobiletools.commons.dialogs +import android.content.ActivityNotFoundException import android.content.Intent import android.media.MediaPlayer import android.net.Uri @@ -18,9 +19,11 @@ import com.simplemobiletools.commons.views.MyCompatRadioButton import kotlinx.android.synthetic.main.dialog_select_alarm_sound.view.* import java.util.* -class SelectAlarmSoundDialog(val activity: BaseSimpleActivity, val currentUri: String, val audioStream: Int, val pickAudioIntentId: Int, - val type: Int, val loopAudio: Boolean, val onAlarmPicked: (alarmSound: AlarmSound?) -> Unit, - val onAlarmSoundDeleted: (alarmSound: AlarmSound) -> Unit) { +class SelectAlarmSoundDialog( + val activity: BaseSimpleActivity, val currentUri: String, val audioStream: Int, val pickAudioIntentId: Int, + val type: Int, val loopAudio: Boolean, val onAlarmPicked: (alarmSound: AlarmSound?) -> Unit, + val onAlarmSoundDeleted: (alarmSound: AlarmSound) -> Unit +) { private val ADD_NEW_SOUND_ID = -2 private val view = activity.layoutInflater.inflate(R.layout.dialog_select_alarm_sound, null) @@ -42,13 +45,13 @@ class SelectAlarmSoundDialog(val activity: BaseSimpleActivity, val currentUri: S addYourAlarms() dialog = AlertDialog.Builder(activity) - .setOnDismissListener { mediaPlayer?.stop() } - .setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() } - .setNegativeButton(R.string.cancel, null) - .create().apply { - activity.setupDialogStuff(view, this) - window?.volumeControlStream = audioStream - } + .setOnDismissListener { mediaPlayer?.stop() } + .setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() } + .setNegativeButton(R.string.cancel, null) + .create().apply { + activity.setupDialogStuff(view, this) + window?.volumeControlStream = audioStream + } } private fun addYourAlarms() { @@ -103,11 +106,16 @@ class SelectAlarmSoundDialog(val activity: BaseSimpleActivity, val currentUri: S alarmSound.uri == SILENT -> mediaPlayer?.stop() alarmSound.id == ADD_NEW_SOUND_ID -> { val action = Intent.ACTION_OPEN_DOCUMENT - Intent(action).apply { + val intent = Intent(action).apply { type = "audio/*" - activity.startActivityForResult(this, pickAudioIntentId) flags = flags or Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION } + + try { + activity.startActivityForResult(intent, pickAudioIntentId) + } catch (e: ActivityNotFoundException) { + activity.toast(R.string.no_app_found) + } dialog.dismiss() } else -> try { From de71536f971f31471a61ddbc9e32104496a70e75 Mon Sep 17 00:00:00 2001 From: darthpaul Date: Mon, 20 Sep 2021 15:18:46 +0100 Subject: [PATCH 03/34] Add null equivalent methods for getLong and getString for Cursor --- .../kotlin/com/simplemobiletools/commons/extensions/Cursor.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt index 97d7257c5..688ad35c2 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt @@ -3,11 +3,12 @@ package com.simplemobiletools.commons.extensions import android.database.Cursor fun Cursor.getStringValue(key: String) = getString(getColumnIndex(key)) +fun Cursor.getStringValueOrNull(key: String) = if (isNull(getColumnIndex(key))) null else getString(getColumnIndex(key)) fun Cursor.getIntValue(key: String) = getInt(getColumnIndex(key)) - fun Cursor.getIntValueOrNull(key: String) = if (isNull(getColumnIndex(key))) null else getInt(getColumnIndex(key)) fun Cursor.getLongValue(key: String) = getLong(getColumnIndex(key)) +fun Cursor.getLongValueOrNull(key: String) = if (isNull(getColumnIndex(key))) null else getLong(getColumnIndex(key)) fun Cursor.getBlobValue(key: String) = getBlob(getColumnIndex(key)) From 01be2f00c58b73cf79a14110e41aa777726a3509 Mon Sep 17 00:00:00 2001 From: Andrii Chubko Date: Mon, 13 Sep 2021 03:40:02 +0300 Subject: [PATCH 04/34] Add recent colors for color picker Store 5 recently used colors for ColorPickerDialog, number is configured by `RECENT_COLORS_NUMBER` in `ColorPickerDialog`. Client apps need to pass `showRecentColors = true` if they want these colors to be displayed. --- .../commons/dialogs/ColorPickerDialog.kt | 87 +++++++++++++++---- .../commons/extensions/ImageView.kt | 2 +- .../commons/helpers/BaseConfig.kt | 5 ++ .../commons/helpers/Constants.kt | 1 + .../main/res/layout/dialog_color_picker.xml | 25 ++++++ 5 files changed, 101 insertions(+), 19 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt index c702cd900..1a4128a48 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt @@ -14,19 +14,30 @@ import com.simplemobiletools.commons.R import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.views.ColorPickerSquare import kotlinx.android.synthetic.main.dialog_color_picker.view.* +import java.util.* + +private const val RECENT_COLORS_NUMBER = 5 // forked from https://github.com/yukuku/ambilwarna -class ColorPickerDialog(val activity: Activity, color: Int, val removeDimmedBackground: Boolean = false, showUseDefaultButton: Boolean = false, - val currentColorCallback: ((color: Int) -> Unit)? = null, val callback: (wasPositivePressed: Boolean, color: Int) -> Unit) { - lateinit var viewHue: View - lateinit var viewSatVal: ColorPickerSquare - lateinit var viewCursor: ImageView - lateinit var viewNewColor: ImageView - lateinit var viewTarget: ImageView - lateinit var newHexField: EditText - lateinit var viewContainer: ViewGroup +class ColorPickerDialog( + val activity: Activity, + color: Int, + showRecentColors: Boolean = false, + val removeDimmedBackground: Boolean = false, + showUseDefaultButton: Boolean = false, + val currentColorCallback: ((color: Int) -> Unit)? = null, + val callback: (wasPositivePressed: Boolean, color: Int) -> Unit +) { + var viewHue: View + var viewSatVal: ColorPickerSquare + var viewCursor: ImageView + var viewNewColor: ImageView + var viewTarget: ImageView + var newHexField: EditText + var viewContainer: ViewGroup + private val baseConfig = activity.baseConfig private val currentColorHsv = FloatArray(3) - private val backgroundColor = activity.baseConfig.backgroundColor + private val backgroundColor = baseConfig.backgroundColor private val cornerRadius = activity.getCornerRadius() private var isHueBeingDragged = false private var wasDimmedBackgroundRemoved = false @@ -57,6 +68,10 @@ class ColorPickerDialog(val activity: Activity, color: Int, val removeDimmedBack true } newHexField.setText(hexCode) + + if (showRecentColors) { + setupRecentColors() + } } viewHue.setOnTouchListener(OnTouchListener { v, event -> @@ -125,11 +140,11 @@ class ColorPickerDialog(val activity: Activity, color: Int, val removeDimmedBack } } - val textColor = activity.baseConfig.textColor + val textColor = baseConfig.textColor val builder = AlertDialog.Builder(activity) - .setPositiveButton(R.string.ok) { dialog, which -> confirmNewColor() } - .setNegativeButton(R.string.cancel) { dialog, which -> dialogDismissed() } - .setOnCancelListener { dialogDismissed() } + .setPositiveButton(R.string.ok) { dialog, which -> confirmNewColor() } + .setNegativeButton(R.string.cancel) { dialog, which -> dialogDismissed() } + .setOnCancelListener { dialogDismissed() } if (showUseDefaultButton) { builder.setNeutralButton(R.string.use_default) { dialog, which -> useDefault() } @@ -149,21 +164,57 @@ class ColorPickerDialog(val activity: Activity, color: Int, val removeDimmedBack } } + private fun View.setupRecentColors() { + val recentColors = baseConfig.colorPickerRecentColors + if (recentColors.isNotEmpty()) { + recent_colors.beVisible() + val squareSize = context.resources.getDimensionPixelSize(R.dimen.normal_icon_size) + recentColors.take(RECENT_COLORS_NUMBER).forEach { recentColor -> + val recentColorView = ImageView(context) + recentColorView.id = View.generateViewId() + recentColorView.layoutParams = ViewGroup.LayoutParams(squareSize, squareSize) + recentColorView.setFillWithStroke(recentColor, backgroundColor) + recentColorView.setOnClickListener { newHexField.setText(getHexCode(recentColor)) } + recent_colors.addView(recentColorView) + recent_colors_flow.addView(recentColorView) + } + } + } + private fun dialogDismissed() { callback(false, 0) } private fun confirmNewColor() { val hexValue = newHexField.value - if (hexValue.length == 6) { - callback(true, Color.parseColor("#$hexValue")) + val newColor = if (hexValue.length == 6) { + Color.parseColor("#$hexValue") } else { - callback(true, getColor()) + getColor() } + addRecentColor(newColor) + + callback(true, newColor) } private fun useDefault() { - callback(true, activity.baseConfig.defaultNavigationBarColor) + val defaultColor = baseConfig.defaultNavigationBarColor + addRecentColor(defaultColor) + + callback(true, defaultColor) + } + + private fun addRecentColor(color: Int) { + var recentColors = baseConfig.colorPickerRecentColors + + recentColors.remove(color) + if (recentColors.size >= RECENT_COLORS_NUMBER) { + val numberOfColorsToDrop = recentColors.size - RECENT_COLORS_NUMBER + 1 + recentColors = LinkedList(recentColors.dropLast(numberOfColorsToDrop)) + } + recentColors.addFirst(color) + + baseConfig.colorPickerRecentColors = recentColors } private fun getHexCode(color: Int) = color.toHex().substring(1) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/ImageView.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/ImageView.kt index 12539a6e2..b607568dc 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/ImageView.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/ImageView.kt @@ -10,7 +10,7 @@ fun ImageView.setFillWithStroke(fillColor: Int, backgroundColor: Int, cornerRadi shape = GradientDrawable.RECTANGLE setColor(fillColor) setStroke(2, strokeColor) - setBackgroundDrawable(this) + background = this if (cornerRadiusSize != 0f) { cornerRadius = cornerRadiusSize diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/BaseConfig.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/BaseConfig.kt index 620b12b8b..f8648727d 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/BaseConfig.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/BaseConfig.kt @@ -442,4 +442,9 @@ open class BaseConfig(val context: Context) { var showCallConfirmation: Boolean get() = prefs.getBoolean(SHOW_CALL_CONFIRMATION, false) set(showCallConfirmation) = prefs.edit().putBoolean(SHOW_CALL_CONFIRMATION, showCallConfirmation).apply() + + // color picker last used colors + internal var colorPickerRecentColors: LinkedList + get() = LinkedList(prefs.getString(COLOR_PICKER_RECENT_COLORS, null)?.lines()?.map { it.toInt() } ?: emptyList()) + set(recentColors) = prefs.edit().putString(COLOR_PICKER_RECENT_COLORS, recentColors.joinToString(separator = "\n")).apply() } diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt index ea7817cb2..8938f1f0a 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/helpers/Constants.kt @@ -150,6 +150,7 @@ const val DEFAULT_TAB = "default_tab" const val START_NAME_WITH_SURNAME = "start_name_with_surname" const val FAVORITES = "favorites" const val SHOW_CALL_CONFIRMATION = "show_call_confirmation" +internal const val COLOR_PICKER_RECENT_COLORS = "color_picker_recent_colors" // licenses internal const val LICENSE_KOTLIN = 1 diff --git a/commons/src/main/res/layout/dialog_color_picker.xml b/commons/src/main/res/layout/dialog_color_picker.xml index ca278a941..dd91e2b87 100644 --- a/commons/src/main/res/layout/dialog_color_picker.xml +++ b/commons/src/main/res/layout/dialog_color_picker.xml @@ -1,5 +1,6 @@ + + + + + + Date: Mon, 20 Sep 2021 18:06:12 +0300 Subject: [PATCH 05/34] Change recent color square size and use rounded corners --- .../simplemobiletools/commons/dialogs/ColorPickerDialog.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt index 1a4128a48..e6442b260 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt @@ -168,12 +168,12 @@ class ColorPickerDialog( val recentColors = baseConfig.colorPickerRecentColors if (recentColors.isNotEmpty()) { recent_colors.beVisible() - val squareSize = context.resources.getDimensionPixelSize(R.dimen.normal_icon_size) + val squareSize = context.resources.getDimensionPixelSize(R.dimen.colorpicker_hue_width) recentColors.take(RECENT_COLORS_NUMBER).forEach { recentColor -> val recentColorView = ImageView(context) recentColorView.id = View.generateViewId() recentColorView.layoutParams = ViewGroup.LayoutParams(squareSize, squareSize) - recentColorView.setFillWithStroke(recentColor, backgroundColor) + recentColorView.setFillWithStroke(recentColor, backgroundColor, cornerRadius) recentColorView.setOnClickListener { newHexField.setText(getHexCode(recentColor)) } recent_colors.addView(recentColorView) recent_colors_flow.addView(recentColorView) From fe6e757aac64303ec9e8264d23f188480c1a6f6e Mon Sep 17 00:00:00 2001 From: Andrii Chubko Date: Mon, 20 Sep 2021 18:36:13 +0300 Subject: [PATCH 06/34] Center recent colors horizontally --- commons/src/main/res/layout/dialog_color_picker.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/src/main/res/layout/dialog_color_picker.xml b/commons/src/main/res/layout/dialog_color_picker.xml index dd91e2b87..0651cbcb8 100644 --- a/commons/src/main/res/layout/dialog_color_picker.xml +++ b/commons/src/main/res/layout/dialog_color_picker.xml @@ -27,7 +27,7 @@ app:flow_horizontalGap="@dimen/activity_margin" app:flow_verticalGap="@dimen/medium_margin" app:flow_maxElementsWrap="5" - app:flow_wrapMode="aligned" + app:flow_wrapMode="chain" app:flow_horizontalStyle="packed" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" From 3b014e1cd4973fdf27f523abb3a4a12b17555874 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 20 Sep 2021 22:24:52 +0200 Subject: [PATCH 07/34] adding a new string for filename without txt --- commons/src/main/res/values-ar/strings.xml | 1 + commons/src/main/res/values-az/strings.xml | 1 + commons/src/main/res/values-br/strings.xml | 1 + commons/src/main/res/values-ca/strings.xml | 1 + commons/src/main/res/values-cs/strings.xml | 1 + commons/src/main/res/values-cy/strings.xml | 1 + commons/src/main/res/values-da/strings.xml | 1 + commons/src/main/res/values-de/strings.xml | 1 + commons/src/main/res/values-el/strings.xml | 1 + commons/src/main/res/values-es/strings.xml | 1 + commons/src/main/res/values-eu/strings.xml | 1 + commons/src/main/res/values-fa/strings.xml | 1 + commons/src/main/res/values-fi/strings.xml | 1 + commons/src/main/res/values-fr/strings.xml | 1 + commons/src/main/res/values-gl/strings.xml | 1 + commons/src/main/res/values-hi-rIN/strings.xml | 1 + commons/src/main/res/values-hr/strings.xml | 1 + commons/src/main/res/values-hu/strings.xml | 1 + commons/src/main/res/values-id/strings.xml | 1 + commons/src/main/res/values-in/strings.xml | 1 + commons/src/main/res/values-it/strings.xml | 1 + commons/src/main/res/values-iw/strings.xml | 1 + commons/src/main/res/values-ja/strings.xml | 1 + commons/src/main/res/values-ko-rKR/strings.xml | 1 + commons/src/main/res/values-lt/strings.xml | 1 + commons/src/main/res/values-nb/strings.xml | 1 + commons/src/main/res/values-nl/strings.xml | 1 + commons/src/main/res/values-no/strings.xml | 1 + commons/src/main/res/values-pl/strings.xml | 1 + commons/src/main/res/values-pt-rBR/strings.xml | 1 + commons/src/main/res/values-pt/strings.xml | 1 + commons/src/main/res/values-ru/strings.xml | 1 + commons/src/main/res/values-sk/strings.xml | 1 + commons/src/main/res/values-sl/strings.xml | 1 + commons/src/main/res/values-sr/strings.xml | 1 + commons/src/main/res/values-sv/strings.xml | 1 + commons/src/main/res/values-ta/strings.xml | 1 + commons/src/main/res/values-tr/strings.xml | 1 + commons/src/main/res/values-uk/strings.xml | 1 + commons/src/main/res/values-vi/strings.xml | 1 + commons/src/main/res/values-zh-rCN/strings.xml | 1 + commons/src/main/res/values-zh-rTW/strings.xml | 1 + commons/src/main/res/values/strings.xml | 1 + 43 files changed, 43 insertions(+) diff --git a/commons/src/main/res/values-ar/strings.xml b/commons/src/main/res/values-ar/strings.xml index f78b4442b..85474aead 100644 --- a/commons/src/main/res/values-ar/strings.xml +++ b/commons/src/main/res/values-ar/strings.xml @@ -104,6 +104,7 @@ النمط السلسلة التي تريد إضافتها %Y - سنة\n%M - شهر\n%D - يوم\n%h - ساعة\n%m - دقيقة\n%s - ثانية\n%i - الرقم يزداد من 1 + Filename (without .txt) نسخ diff --git a/commons/src/main/res/values-az/strings.xml b/commons/src/main/res/values-az/strings.xml index 78e2af55c..fd120ed18 100644 --- a/commons/src/main/res/values-az/strings.xml +++ b/commons/src/main/res/values-az/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Kopyala diff --git a/commons/src/main/res/values-br/strings.xml b/commons/src/main/res/values-br/strings.xml index 736a125cb..aceeca803 100644 --- a/commons/src/main/res/values-br/strings.xml +++ b/commons/src/main/res/values-br/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Copy diff --git a/commons/src/main/res/values-ca/strings.xml b/commons/src/main/res/values-ca/strings.xml index 46ed57c3b..7f8ac5435 100644 --- a/commons/src/main/res/values-ca/strings.xml +++ b/commons/src/main/res/values-ca/strings.xml @@ -104,6 +104,7 @@ Patró Cadena per afegir %Y - any\n%M - mes\n%D - dia\n%h - hora\n%m - minut\n%s - segon\n%i - nombre augmentant des de 1 + Filename (without .txt) Copiar diff --git a/commons/src/main/res/values-cs/strings.xml b/commons/src/main/res/values-cs/strings.xml index 3beed9d13..844406b18 100644 --- a/commons/src/main/res/values-cs/strings.xml +++ b/commons/src/main/res/values-cs/strings.xml @@ -104,6 +104,7 @@ Vzor Přidat řetězec %Y - rok\n%M - měsíc\n%D - den\n%h - hodina\n%m - minuta\n%s - sekunda\n%i - číslo narůstající od 1 + Filename (without .txt) Kopírovat diff --git a/commons/src/main/res/values-cy/strings.xml b/commons/src/main/res/values-cy/strings.xml index e6ff86ca8..e680a7a25 100644 --- a/commons/src/main/res/values-cy/strings.xml +++ b/commons/src/main/res/values-cy/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Copïo diff --git a/commons/src/main/res/values-da/strings.xml b/commons/src/main/res/values-da/strings.xml index d3f3f8a8c..b1a83d29d 100644 --- a/commons/src/main/res/values-da/strings.xml +++ b/commons/src/main/res/values-da/strings.xml @@ -104,6 +104,7 @@ Mønster Tekststreng der skal tilføjes %Y - år\n%M - måned\n%D - dag\n%h - time\n%m - minut\n%s - sekund\n%i - tal stigende fra 1 + Filename (without .txt) Kopier diff --git a/commons/src/main/res/values-de/strings.xml b/commons/src/main/res/values-de/strings.xml index 3f80e4bd6..a690b9402 100644 --- a/commons/src/main/res/values-de/strings.xml +++ b/commons/src/main/res/values-de/strings.xml @@ -104,6 +104,7 @@ Muster Text zum Hinzufügen %Y - Jahr\n%M - Monat\n%D - Tag\n%h - Stunde\n%m - Minute\n%s - Sekunde\n%i - Aufsteigender Index, beginnt bei 1 + Filename (without .txt) Kopieren diff --git a/commons/src/main/res/values-el/strings.xml b/commons/src/main/res/values-el/strings.xml index 75e2ebeb8..1ae20fb2a 100644 --- a/commons/src/main/res/values-el/strings.xml +++ b/commons/src/main/res/values-el/strings.xml @@ -104,6 +104,7 @@ Μοτίβο Συμβολοσειρά για προσθήκη %Y - έτος\n%M - μήνας\n%D - ημέρα\n%h - ώρα\n%m - λεπτό\n%s - δευτ/το\n%i - αύξηση αριθμού από 1 + Filename (without .txt) Αντιγραφή diff --git a/commons/src/main/res/values-es/strings.xml b/commons/src/main/res/values-es/strings.xml index 8ef7c4905..dddb54c30 100644 --- a/commons/src/main/res/values-es/strings.xml +++ b/commons/src/main/res/values-es/strings.xml @@ -104,6 +104,7 @@ Modelo Cadena para agregar %Y - Año\n%M - Mes\n%D - Día\n%h - Hora\n%m - Minuto\n%s - Segundo\n%i - número aumentando desde 1 + Filename (without .txt) Copiar diff --git a/commons/src/main/res/values-eu/strings.xml b/commons/src/main/res/values-eu/strings.xml index 894390cc4..3b47d4df3 100644 --- a/commons/src/main/res/values-eu/strings.xml +++ b/commons/src/main/res/values-eu/strings.xml @@ -104,6 +104,7 @@ Eredua Gehitzeko katea %Y - urtea\n%M - hilabetea\n%D - eguna\n%h - ordua\n%m - minutua\n%s - segundoa\n%i - 1 baino gehiago den zenbakia + Filename (without .txt) Kopiatu diff --git a/commons/src/main/res/values-fa/strings.xml b/commons/src/main/res/values-fa/strings.xml index 97499880d..19c24d132 100644 --- a/commons/src/main/res/values-fa/strings.xml +++ b/commons/src/main/res/values-fa/strings.xml @@ -104,6 +104,7 @@ الگو رشته برای افزودن %Y - سال\n%M - ماه\n%D - روز\n%h - ساعت\n%m - دقیقه\n%s - ثانیه\n%i - افزایش اعداد با شروع از 1 + Filename (without .txt) رونوشت diff --git a/commons/src/main/res/values-fi/strings.xml b/commons/src/main/res/values-fi/strings.xml index 29ab0bb5f..1ae03b976 100644 --- a/commons/src/main/res/values-fi/strings.xml +++ b/commons/src/main/res/values-fi/strings.xml @@ -104,6 +104,7 @@ Kuvio Lisättävä merkkijono %Y - vuosi\n%M - kuukausi\n%D - päivä\n%h - tunti\n%m - minuutti\n%s - sekunti\n%i - nouseva numero, alkaen numerosta 1 + Filename (without .txt) Kopioi diff --git a/commons/src/main/res/values-fr/strings.xml b/commons/src/main/res/values-fr/strings.xml index 659e822b9..1339b0c5c 100644 --- a/commons/src/main/res/values-fr/strings.xml +++ b/commons/src/main/res/values-fr/strings.xml @@ -104,6 +104,7 @@ Modèle Caractères à ajouter %Y - année\n%M - mois\n%D - jour\n%h - heure\n%m - minute\n%s - seconde\n%i - Incrémentation débute à 1 + Filename (without .txt) Copier diff --git a/commons/src/main/res/values-gl/strings.xml b/commons/src/main/res/values-gl/strings.xml index 745932680..aafe1fe84 100644 --- a/commons/src/main/res/values-gl/strings.xml +++ b/commons/src/main/res/values-gl/strings.xml @@ -104,6 +104,7 @@ Patrón Cadea a engadir %Y - ano\n%M - mes\n%D - día\n%h - hora\n%m - minuto\n%s - segundo\n%i - número incremental desde 1 + Filename (without .txt) Copiar diff --git a/commons/src/main/res/values-hi-rIN/strings.xml b/commons/src/main/res/values-hi-rIN/strings.xml index f60cd32dc..57a9a0b6c 100644 --- a/commons/src/main/res/values-hi-rIN/strings.xml +++ b/commons/src/main/res/values-hi-rIN/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Copy diff --git a/commons/src/main/res/values-hr/strings.xml b/commons/src/main/res/values-hr/strings.xml index 3099b8c04..6510ba011 100644 --- a/commons/src/main/res/values-hr/strings.xml +++ b/commons/src/main/res/values-hr/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Kopiraj diff --git a/commons/src/main/res/values-hu/strings.xml b/commons/src/main/res/values-hu/strings.xml index c6bde7493..724999202 100644 --- a/commons/src/main/res/values-hu/strings.xml +++ b/commons/src/main/res/values-hu/strings.xml @@ -104,6 +104,7 @@ Minta String to add %É - év\n%H - hónap\n%N - nap\n%ó - óra\n%p - perc\n%mp - másodperc\n%i - number increasing from 1 + Filename (without .txt) Másolás diff --git a/commons/src/main/res/values-id/strings.xml b/commons/src/main/res/values-id/strings.xml index 40ba04302..aae6acc8e 100644 --- a/commons/src/main/res/values-id/strings.xml +++ b/commons/src/main/res/values-id/strings.xml @@ -104,6 +104,7 @@ Pola Kata untuk ditambahkan %Y - tahun\n%M - bulan\n%D - hari\n%h - jam\n%m - menit\n%s - detik\n%i - angka bertambah mulai dari 1 + Filename (without .txt) Salin diff --git a/commons/src/main/res/values-in/strings.xml b/commons/src/main/res/values-in/strings.xml index a0ac8bf96..26ac2ff47 100644 --- a/commons/src/main/res/values-in/strings.xml +++ b/commons/src/main/res/values-in/strings.xml @@ -104,6 +104,7 @@ Pola Kata untuk ditambahkan %Y - tahun\n%M - bulan\n%D - hari\n%h - jam\n%m - menit\n%s - detik\n%i - angka bertambah mulai dari 1 + Filename (without .txt) Salin diff --git a/commons/src/main/res/values-it/strings.xml b/commons/src/main/res/values-it/strings.xml index f2653c541..d88d134ca 100644 --- a/commons/src/main/res/values-it/strings.xml +++ b/commons/src/main/res/values-it/strings.xml @@ -104,6 +104,7 @@ Modello Stringa da aggiungere %Y - anno\n%M - mese\n%D - giorno\n%h - ora\n%m - minuto\n%s - secondo\n%i - number increasing from 1 + Filename (without .txt) Copia diff --git a/commons/src/main/res/values-iw/strings.xml b/commons/src/main/res/values-iw/strings.xml index 523f3a137..15645f5f7 100644 --- a/commons/src/main/res/values-iw/strings.xml +++ b/commons/src/main/res/values-iw/strings.xml @@ -104,6 +104,7 @@ דפוס מחרוזת להוספה %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) העתק diff --git a/commons/src/main/res/values-ja/strings.xml b/commons/src/main/res/values-ja/strings.xml index 77f1f9fbf..e472a88ce 100644 --- a/commons/src/main/res/values-ja/strings.xml +++ b/commons/src/main/res/values-ja/strings.xml @@ -104,6 +104,7 @@ パターン 追加する文字列 %Y - 年\n%M - 月\n%D - 日\n%h - 時\n%m - 分\n%s - 秒\n%i - 1から増える数 + Filename (without .txt) コピー diff --git a/commons/src/main/res/values-ko-rKR/strings.xml b/commons/src/main/res/values-ko-rKR/strings.xml index 26d69d019..0f3b997ba 100644 --- a/commons/src/main/res/values-ko-rKR/strings.xml +++ b/commons/src/main/res/values-ko-rKR/strings.xml @@ -104,6 +104,7 @@ 패턴 추가할 문장 %Y - 년\n%M - 월\n%D - 일\n%h - 시\n%m - 분\n%s - 초\n%i - number increasing from 1 + Filename (without .txt) 복사 diff --git a/commons/src/main/res/values-lt/strings.xml b/commons/src/main/res/values-lt/strings.xml index 7a29ff417..1fe4efbe3 100644 --- a/commons/src/main/res/values-lt/strings.xml +++ b/commons/src/main/res/values-lt/strings.xml @@ -104,6 +104,7 @@ Modelis Pridedama eilutė %Y - metai\n%M - mėnuo\n%D - diena\n%h - valanda\n%m - minutė\n%s - sekundė\n%i - number increasing from 1 + Filename (without .txt) Kopijuoti diff --git a/commons/src/main/res/values-nb/strings.xml b/commons/src/main/res/values-nb/strings.xml index 9609f9aa2..0ccc79131 100644 --- a/commons/src/main/res/values-nb/strings.xml +++ b/commons/src/main/res/values-nb/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Kopier diff --git a/commons/src/main/res/values-nl/strings.xml b/commons/src/main/res/values-nl/strings.xml index fb3bb7f2e..1ba15f293 100644 --- a/commons/src/main/res/values-nl/strings.xml +++ b/commons/src/main/res/values-nl/strings.xml @@ -104,6 +104,7 @@ Patroon Tekens toevoegen %Y - jaar\n%M - maand\n%D - dag\n%h - uur\n%m - minuut\n%s - seconde\n%i - getal oplopend vanaf 1 + Filename (without .txt) Kopiëren diff --git a/commons/src/main/res/values-no/strings.xml b/commons/src/main/res/values-no/strings.xml index fc5e27f08..7e782fdcd 100644 --- a/commons/src/main/res/values-no/strings.xml +++ b/commons/src/main/res/values-no/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Kopier diff --git a/commons/src/main/res/values-pl/strings.xml b/commons/src/main/res/values-pl/strings.xml index 322b6551a..708698aad 100644 --- a/commons/src/main/res/values-pl/strings.xml +++ b/commons/src/main/res/values-pl/strings.xml @@ -104,6 +104,7 @@ Wzór Ciąg do dodania %Y - rok\n%M - miesiąc\n%D - dzień\n%h - godzina\n%m - minuta\n%s - sekunda\n%i - numer rosnący od 1 + Filename (without .txt) Kopiuj diff --git a/commons/src/main/res/values-pt-rBR/strings.xml b/commons/src/main/res/values-pt-rBR/strings.xml index bf73e6e13..bd87da2c1 100644 --- a/commons/src/main/res/values-pt-rBR/strings.xml +++ b/commons/src/main/res/values-pt-rBR/strings.xml @@ -104,6 +104,7 @@ Padrão Texto a adicionar %Y - ano\n%M - mês\n%D - dia\n%h - hora\n%m - minuto\n%s - segundo\n%i – aumento numérico de 1 + Filename (without .txt) Copiar diff --git a/commons/src/main/res/values-pt/strings.xml b/commons/src/main/res/values-pt/strings.xml index 0ae160281..daa516d9b 100644 --- a/commons/src/main/res/values-pt/strings.xml +++ b/commons/src/main/res/values-pt/strings.xml @@ -104,6 +104,7 @@ Padrão Texto a adicionar %Y - ano\n%M - mês\n%D - dia\n%h - horas\n%m - minutos\n%s - segundos\n%i - incremento númerico a partir de 1 + Filename (without .txt) Copiar diff --git a/commons/src/main/res/values-ru/strings.xml b/commons/src/main/res/values-ru/strings.xml index 8f6610744..456fc9deb 100644 --- a/commons/src/main/res/values-ru/strings.xml +++ b/commons/src/main/res/values-ru/strings.xml @@ -104,6 +104,7 @@ Шаблон Строка для добавления %Y - год\n%M - месяц\n%D - день\n%h - час\n%m - минута\n%s - секунда\n%i - порядковый номер с 1 + Filename (without .txt) Копировать diff --git a/commons/src/main/res/values-sk/strings.xml b/commons/src/main/res/values-sk/strings.xml index 588d43afe..a6256f55a 100644 --- a/commons/src/main/res/values-sk/strings.xml +++ b/commons/src/main/res/values-sk/strings.xml @@ -104,6 +104,7 @@ Vzor Reťazec na pridanie %Y - rok\n%M - mesiac\n%D - deň\n%h - hodina\n%m - minúta\n%s - sekunda\n%i - číslo narastajúce od 1 + Názov súboru (bez .txt) Kopírovať diff --git a/commons/src/main/res/values-sl/strings.xml b/commons/src/main/res/values-sl/strings.xml index 8bfbc02c5..d61686321 100644 --- a/commons/src/main/res/values-sl/strings.xml +++ b/commons/src/main/res/values-sl/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Kopiraj diff --git a/commons/src/main/res/values-sr/strings.xml b/commons/src/main/res/values-sr/strings.xml index 2e933983a..6361d8bfa 100644 --- a/commons/src/main/res/values-sr/strings.xml +++ b/commons/src/main/res/values-sr/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Копирај diff --git a/commons/src/main/res/values-sv/strings.xml b/commons/src/main/res/values-sv/strings.xml index ca7b3517b..a519b6e7e 100644 --- a/commons/src/main/res/values-sv/strings.xml +++ b/commons/src/main/res/values-sv/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - år\n%M - månad\n%D - dag\n%h - timme\n%m - minut\n%s - sekund\n%i - number increasing from 1 + Filename (without .txt) Kopiera diff --git a/commons/src/main/res/values-ta/strings.xml b/commons/src/main/res/values-ta/strings.xml index a1c9c1ec1..614b2f805 100644 --- a/commons/src/main/res/values-ta/strings.xml +++ b/commons/src/main/res/values-ta/strings.xml @@ -104,6 +104,7 @@ முறை சேர்க்க வேண்டிய சரம் %Y - ஆண்டு\n%M - மாதம்\n%D - நாள்\n%h - மணி\n%m - நிமிடம்\n%s - விநாடிகள்\n%i - 1 இலிருந்து அதிகரிக்கும் எண் + Filename (without .txt) நகலெடுக்கவும் diff --git a/commons/src/main/res/values-tr/strings.xml b/commons/src/main/res/values-tr/strings.xml index e73871e77..4a1c71831 100644 --- a/commons/src/main/res/values-tr/strings.xml +++ b/commons/src/main/res/values-tr/strings.xml @@ -104,6 +104,7 @@ Desen Eklenecek dize %Y - yıl\n%M - ay\n%D - gün\n%h - saat\n%m - dakika\n%s - saniye\n%i - 1\'den artan sayı + Filename (without .txt) Kopyala diff --git a/commons/src/main/res/values-uk/strings.xml b/commons/src/main/res/values-uk/strings.xml index d169351ac..74413c08f 100644 --- a/commons/src/main/res/values-uk/strings.xml +++ b/commons/src/main/res/values-uk/strings.xml @@ -104,6 +104,7 @@ Шаблон Рядок для додавання %Y - рік\n%M - місяць\n%D - день\n%h - година\n%m - хвилина\n%s - секунда\n%i - номер від 1 + Filename (without .txt) Копіювати diff --git a/commons/src/main/res/values-vi/strings.xml b/commons/src/main/res/values-vi/strings.xml index 2ec743de2..38e8746d3 100644 --- a/commons/src/main/res/values-vi/strings.xml +++ b/commons/src/main/res/values-vi/strings.xml @@ -104,6 +104,7 @@ Mẫu Chuỗi để thêm %Y - năm\n%M - tháng\n%D - ngày\n%h - giờ\n%m - phút\n%s - giây\n%i - số tăng từ 1 + Filename (without .txt) Sao chép diff --git a/commons/src/main/res/values-zh-rCN/strings.xml b/commons/src/main/res/values-zh-rCN/strings.xml index 83bba9e30..e71da72c6 100644 --- a/commons/src/main/res/values-zh-rCN/strings.xml +++ b/commons/src/main/res/values-zh-rCN/strings.xml @@ -104,6 +104,7 @@ 图案 要添加的字符串 %Y - 年\n%M - 月\n%D - 日\n%h - 时\n%m - 分\n%s - 秒\n%i - 数字从1递增 + Filename (without .txt) 复制 diff --git a/commons/src/main/res/values-zh-rTW/strings.xml b/commons/src/main/res/values-zh-rTW/strings.xml index 7aba08679..d32781a11 100644 --- a/commons/src/main/res/values-zh-rTW/strings.xml +++ b/commons/src/main/res/values-zh-rTW/strings.xml @@ -104,6 +104,7 @@ 格式重新命名 添加文字 %Y - 年\n%M - 月\n%D - 日\n%h - 小時\n%m - 分鐘\n%s - 秒鐘\n%i - 數字從1增加起 + Filename (without .txt) 複製 diff --git a/commons/src/main/res/values/strings.xml b/commons/src/main/res/values/strings.xml index 51eb2043c..11e11aa71 100644 --- a/commons/src/main/res/values/strings.xml +++ b/commons/src/main/res/values/strings.xml @@ -104,6 +104,7 @@ Pattern String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 + Filename (without .txt) Copy From bef619280b4c630499ed759ca9c730b3a6bf981e Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 20 Sep 2021 22:25:29 +0200 Subject: [PATCH 08/34] adding a new getStringValueOrNull extension --- .../kotlin/com/simplemobiletools/commons/extensions/Cursor.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt index 97d7257c5..52b82e688 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt @@ -4,6 +4,8 @@ import android.database.Cursor fun Cursor.getStringValue(key: String) = getString(getColumnIndex(key)) +fun Cursor.getStringValueOrNull(key: String) = if (isNull(getColumnIndex(key))) null else getString(getColumnIndex(key)) + fun Cursor.getIntValue(key: String) = getInt(getColumnIndex(key)) fun Cursor.getIntValueOrNull(key: String) = if (isNull(getColumnIndex(key))) null else getInt(getColumnIndex(key)) From a51c4f0030d6ece4a229f2f94490ea5847258da6 Mon Sep 17 00:00:00 2001 From: darthpaul Date: Mon, 20 Sep 2021 21:37:47 +0100 Subject: [PATCH 09/34] Add core-ktx as api dependency and update gson to 2.8.8 --- commons/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/build.gradle b/commons/build.gradle index 256983ecd..9f6978932 100644 --- a/commons/build.gradle +++ b/commons/build.gradle @@ -29,7 +29,6 @@ android { dependencies { implementation 'com.andrognito.patternlockview:patternlockview:1.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.core:core-ktx:1.3.2' implementation 'androidx.constraintlayout:constraintlayout:2.0.4' implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' @@ -37,10 +36,11 @@ dependencies { implementation "androidx.exifinterface:exifinterface:1.3.2" implementation "androidx.biometric:biometric-ktx:1.2.0-alpha03" + api 'androidx.core:core-ktx:1.3.2' api 'androidx.appcompat:appcompat:1.2.0' api 'com.github.ajalt.reprint:core:3.3.2@aar' api 'com.google.android.material:material:1.3.0' - api 'com.google.code.gson:gson:2.8.6' + api 'com.google.code.gson:gson:2.8.8' api 'com.duolingo.open:rtl-viewpager:1.0.3' api 'com.github.bumptech.glide:glide:4.10.0' From fc244e19debf741afc2bce96586c3ba9a792e643 Mon Sep 17 00:00:00 2001 From: darthpaul Date: Mon, 20 Sep 2021 22:00:44 +0100 Subject: [PATCH 10/34] Revert allow passing null projection to queryCursor --- .../com/simplemobiletools/commons/extensions/Context.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt index 00b0d5a47..aa9407dfd 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt @@ -55,7 +55,9 @@ import com.simplemobiletools.commons.models.SharedTheme import com.simplemobiletools.commons.views.* import java.io.File import java.text.SimpleDateFormat -import java.util.* +import java.util.ArrayList +import java.util.Date +import java.util.Locale fun Context.getSharedPrefs() = getSharedPreferences(PREFS_KEY, Context.MODE_PRIVATE) @@ -338,7 +340,7 @@ fun Context.getMediaContent(path: String, uri: Uri): Uri? { fun Context.queryCursor( uri: Uri, - projection: Array? = null, + projection: Array, selection: String? = null, selectionArgs: Array? = null, sortOrder: String? = null, From 0b3c188538eb5331a4eb84527e5766a83e5fec7c Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Mon, 20 Sep 2021 23:11:43 +0200 Subject: [PATCH 11/34] Update Cursor.kt --- .../kotlin/com/simplemobiletools/commons/extensions/Cursor.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt index 688ad35c2..e6fff35dd 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Cursor.kt @@ -3,12 +3,15 @@ package com.simplemobiletools.commons.extensions import android.database.Cursor fun Cursor.getStringValue(key: String) = getString(getColumnIndex(key)) + fun Cursor.getStringValueOrNull(key: String) = if (isNull(getColumnIndex(key))) null else getString(getColumnIndex(key)) fun Cursor.getIntValue(key: String) = getInt(getColumnIndex(key)) + fun Cursor.getIntValueOrNull(key: String) = if (isNull(getColumnIndex(key))) null else getInt(getColumnIndex(key)) fun Cursor.getLongValue(key: String) = getLong(getColumnIndex(key)) + fun Cursor.getLongValueOrNull(key: String) = if (isNull(getColumnIndex(key))) null else getLong(getColumnIndex(key)) fun Cursor.getBlobValue(key: String) = getBlob(getColumnIndex(key)) From 7367bf424e45eccd1a325c3b72f868baaef11601 Mon Sep 17 00:00:00 2001 From: Tibor Kaputa Date: Mon, 20 Sep 2021 23:12:42 +0200 Subject: [PATCH 12/34] Update Context.kt --- .../com/simplemobiletools/commons/extensions/Context.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt index aa9407dfd..f402a594e 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/extensions/Context.kt @@ -55,9 +55,7 @@ import com.simplemobiletools.commons.models.SharedTheme import com.simplemobiletools.commons.views.* import java.io.File import java.text.SimpleDateFormat -import java.util.ArrayList -import java.util.Date -import java.util.Locale +import java.util.* fun Context.getSharedPrefs() = getSharedPreferences(PREFS_KEY, Context.MODE_PRIVATE) From 540c8c39bafb9d4f9e94baed8d2935315020286d Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 21 Sep 2021 12:05:01 +0200 Subject: [PATCH 13/34] adding a new string for filenames without json --- commons/src/main/res/values-ar/strings.xml | 1 + commons/src/main/res/values-az/strings.xml | 1 + commons/src/main/res/values-br/strings.xml | 1 + commons/src/main/res/values-ca/strings.xml | 1 + commons/src/main/res/values-cs/strings.xml | 1 + commons/src/main/res/values-cy/strings.xml | 1 + commons/src/main/res/values-da/strings.xml | 1 + commons/src/main/res/values-de/strings.xml | 1 + commons/src/main/res/values-el/strings.xml | 1 + commons/src/main/res/values-es/strings.xml | 1 + commons/src/main/res/values-eu/strings.xml | 1 + commons/src/main/res/values-fa/strings.xml | 1 + commons/src/main/res/values-fi/strings.xml | 1 + commons/src/main/res/values-fr/strings.xml | 1 + commons/src/main/res/values-gl/strings.xml | 1 + commons/src/main/res/values-hi-rIN/strings.xml | 1 + commons/src/main/res/values-hr/strings.xml | 1 + commons/src/main/res/values-hu/strings.xml | 1 + commons/src/main/res/values-id/strings.xml | 1 + commons/src/main/res/values-in/strings.xml | 1 + commons/src/main/res/values-it/strings.xml | 1 + commons/src/main/res/values-iw/strings.xml | 1 + commons/src/main/res/values-ja/strings.xml | 1 + commons/src/main/res/values-ko-rKR/strings.xml | 1 + commons/src/main/res/values-lt/strings.xml | 1 + commons/src/main/res/values-nb/strings.xml | 1 + commons/src/main/res/values-nl/strings.xml | 1 + commons/src/main/res/values-no/strings.xml | 1 + commons/src/main/res/values-pl/strings.xml | 1 + commons/src/main/res/values-pt-rBR/strings.xml | 1 + commons/src/main/res/values-pt/strings.xml | 1 + commons/src/main/res/values-ru/strings.xml | 1 + commons/src/main/res/values-sk/strings.xml | 1 + commons/src/main/res/values-sl/strings.xml | 1 + commons/src/main/res/values-sr/strings.xml | 1 + commons/src/main/res/values-sv/strings.xml | 1 + commons/src/main/res/values-ta/strings.xml | 1 + commons/src/main/res/values-tr/strings.xml | 1 + commons/src/main/res/values-uk/strings.xml | 1 + commons/src/main/res/values-vi/strings.xml | 1 + commons/src/main/res/values-zh-rCN/strings.xml | 1 + commons/src/main/res/values-zh-rTW/strings.xml | 1 + commons/src/main/res/values/strings.xml | 1 + 43 files changed, 43 insertions(+) diff --git a/commons/src/main/res/values-ar/strings.xml b/commons/src/main/res/values-ar/strings.xml index 85474aead..79678eaf5 100644 --- a/commons/src/main/res/values-ar/strings.xml +++ b/commons/src/main/res/values-ar/strings.xml @@ -105,6 +105,7 @@ السلسلة التي تريد إضافتها %Y - سنة\n%M - شهر\n%D - يوم\n%h - ساعة\n%m - دقيقة\n%s - ثانية\n%i - الرقم يزداد من 1 Filename (without .txt) + Filename (without .json) نسخ diff --git a/commons/src/main/res/values-az/strings.xml b/commons/src/main/res/values-az/strings.xml index fd120ed18..7786eb60f 100644 --- a/commons/src/main/res/values-az/strings.xml +++ b/commons/src/main/res/values-az/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Kopyala diff --git a/commons/src/main/res/values-br/strings.xml b/commons/src/main/res/values-br/strings.xml index aceeca803..911c6a6d2 100644 --- a/commons/src/main/res/values-br/strings.xml +++ b/commons/src/main/res/values-br/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Copy diff --git a/commons/src/main/res/values-ca/strings.xml b/commons/src/main/res/values-ca/strings.xml index 7f8ac5435..83204f560 100644 --- a/commons/src/main/res/values-ca/strings.xml +++ b/commons/src/main/res/values-ca/strings.xml @@ -105,6 +105,7 @@ Cadena per afegir %Y - any\n%M - mes\n%D - dia\n%h - hora\n%m - minut\n%s - segon\n%i - nombre augmentant des de 1 Filename (without .txt) + Filename (without .json) Copiar diff --git a/commons/src/main/res/values-cs/strings.xml b/commons/src/main/res/values-cs/strings.xml index 844406b18..64442bcc3 100644 --- a/commons/src/main/res/values-cs/strings.xml +++ b/commons/src/main/res/values-cs/strings.xml @@ -105,6 +105,7 @@ Přidat řetězec %Y - rok\n%M - měsíc\n%D - den\n%h - hodina\n%m - minuta\n%s - sekunda\n%i - číslo narůstající od 1 Filename (without .txt) + Filename (without .json) Kopírovat diff --git a/commons/src/main/res/values-cy/strings.xml b/commons/src/main/res/values-cy/strings.xml index e680a7a25..ccb0efdde 100644 --- a/commons/src/main/res/values-cy/strings.xml +++ b/commons/src/main/res/values-cy/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Copïo diff --git a/commons/src/main/res/values-da/strings.xml b/commons/src/main/res/values-da/strings.xml index b1a83d29d..c03dd7188 100644 --- a/commons/src/main/res/values-da/strings.xml +++ b/commons/src/main/res/values-da/strings.xml @@ -105,6 +105,7 @@ Tekststreng der skal tilføjes %Y - år\n%M - måned\n%D - dag\n%h - time\n%m - minut\n%s - sekund\n%i - tal stigende fra 1 Filename (without .txt) + Filename (without .json) Kopier diff --git a/commons/src/main/res/values-de/strings.xml b/commons/src/main/res/values-de/strings.xml index a690b9402..1cf921a78 100644 --- a/commons/src/main/res/values-de/strings.xml +++ b/commons/src/main/res/values-de/strings.xml @@ -105,6 +105,7 @@ Text zum Hinzufügen %Y - Jahr\n%M - Monat\n%D - Tag\n%h - Stunde\n%m - Minute\n%s - Sekunde\n%i - Aufsteigender Index, beginnt bei 1 Filename (without .txt) + Filename (without .json) Kopieren diff --git a/commons/src/main/res/values-el/strings.xml b/commons/src/main/res/values-el/strings.xml index 1ae20fb2a..55ee431d5 100644 --- a/commons/src/main/res/values-el/strings.xml +++ b/commons/src/main/res/values-el/strings.xml @@ -105,6 +105,7 @@ Συμβολοσειρά για προσθήκη %Y - έτος\n%M - μήνας\n%D - ημέρα\n%h - ώρα\n%m - λεπτό\n%s - δευτ/το\n%i - αύξηση αριθμού από 1 Filename (without .txt) + Filename (without .json) Αντιγραφή diff --git a/commons/src/main/res/values-es/strings.xml b/commons/src/main/res/values-es/strings.xml index dddb54c30..66f4d2a9b 100644 --- a/commons/src/main/res/values-es/strings.xml +++ b/commons/src/main/res/values-es/strings.xml @@ -105,6 +105,7 @@ Cadena para agregar %Y - Año\n%M - Mes\n%D - Día\n%h - Hora\n%m - Minuto\n%s - Segundo\n%i - número aumentando desde 1 Filename (without .txt) + Filename (without .json) Copiar diff --git a/commons/src/main/res/values-eu/strings.xml b/commons/src/main/res/values-eu/strings.xml index 3b47d4df3..6fb06ec61 100644 --- a/commons/src/main/res/values-eu/strings.xml +++ b/commons/src/main/res/values-eu/strings.xml @@ -105,6 +105,7 @@ Gehitzeko katea %Y - urtea\n%M - hilabetea\n%D - eguna\n%h - ordua\n%m - minutua\n%s - segundoa\n%i - 1 baino gehiago den zenbakia Filename (without .txt) + Filename (without .json) Kopiatu diff --git a/commons/src/main/res/values-fa/strings.xml b/commons/src/main/res/values-fa/strings.xml index 19c24d132..a3ea2e70f 100644 --- a/commons/src/main/res/values-fa/strings.xml +++ b/commons/src/main/res/values-fa/strings.xml @@ -105,6 +105,7 @@ رشته برای افزودن %Y - سال\n%M - ماه\n%D - روز\n%h - ساعت\n%m - دقیقه\n%s - ثانیه\n%i - افزایش اعداد با شروع از 1 Filename (without .txt) + Filename (without .json) رونوشت diff --git a/commons/src/main/res/values-fi/strings.xml b/commons/src/main/res/values-fi/strings.xml index 1ae03b976..77e85db36 100644 --- a/commons/src/main/res/values-fi/strings.xml +++ b/commons/src/main/res/values-fi/strings.xml @@ -105,6 +105,7 @@ Lisättävä merkkijono %Y - vuosi\n%M - kuukausi\n%D - päivä\n%h - tunti\n%m - minuutti\n%s - sekunti\n%i - nouseva numero, alkaen numerosta 1 Filename (without .txt) + Filename (without .json) Kopioi diff --git a/commons/src/main/res/values-fr/strings.xml b/commons/src/main/res/values-fr/strings.xml index 1339b0c5c..93918c2f0 100644 --- a/commons/src/main/res/values-fr/strings.xml +++ b/commons/src/main/res/values-fr/strings.xml @@ -105,6 +105,7 @@ Caractères à ajouter %Y - année\n%M - mois\n%D - jour\n%h - heure\n%m - minute\n%s - seconde\n%i - Incrémentation débute à 1 Filename (without .txt) + Filename (without .json) Copier diff --git a/commons/src/main/res/values-gl/strings.xml b/commons/src/main/res/values-gl/strings.xml index aafe1fe84..2526cc81d 100644 --- a/commons/src/main/res/values-gl/strings.xml +++ b/commons/src/main/res/values-gl/strings.xml @@ -105,6 +105,7 @@ Cadea a engadir %Y - ano\n%M - mes\n%D - día\n%h - hora\n%m - minuto\n%s - segundo\n%i - número incremental desde 1 Filename (without .txt) + Filename (without .json) Copiar diff --git a/commons/src/main/res/values-hi-rIN/strings.xml b/commons/src/main/res/values-hi-rIN/strings.xml index 57a9a0b6c..85d83d70d 100644 --- a/commons/src/main/res/values-hi-rIN/strings.xml +++ b/commons/src/main/res/values-hi-rIN/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Copy diff --git a/commons/src/main/res/values-hr/strings.xml b/commons/src/main/res/values-hr/strings.xml index 6510ba011..1544c2afd 100644 --- a/commons/src/main/res/values-hr/strings.xml +++ b/commons/src/main/res/values-hr/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Kopiraj diff --git a/commons/src/main/res/values-hu/strings.xml b/commons/src/main/res/values-hu/strings.xml index 724999202..d53461fd1 100644 --- a/commons/src/main/res/values-hu/strings.xml +++ b/commons/src/main/res/values-hu/strings.xml @@ -105,6 +105,7 @@ String to add %É - év\n%H - hónap\n%N - nap\n%ó - óra\n%p - perc\n%mp - másodperc\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Másolás diff --git a/commons/src/main/res/values-id/strings.xml b/commons/src/main/res/values-id/strings.xml index aae6acc8e..cf36d0436 100644 --- a/commons/src/main/res/values-id/strings.xml +++ b/commons/src/main/res/values-id/strings.xml @@ -105,6 +105,7 @@ Kata untuk ditambahkan %Y - tahun\n%M - bulan\n%D - hari\n%h - jam\n%m - menit\n%s - detik\n%i - angka bertambah mulai dari 1 Filename (without .txt) + Filename (without .json) Salin diff --git a/commons/src/main/res/values-in/strings.xml b/commons/src/main/res/values-in/strings.xml index 26ac2ff47..5c19f5d99 100644 --- a/commons/src/main/res/values-in/strings.xml +++ b/commons/src/main/res/values-in/strings.xml @@ -105,6 +105,7 @@ Kata untuk ditambahkan %Y - tahun\n%M - bulan\n%D - hari\n%h - jam\n%m - menit\n%s - detik\n%i - angka bertambah mulai dari 1 Filename (without .txt) + Filename (without .json) Salin diff --git a/commons/src/main/res/values-it/strings.xml b/commons/src/main/res/values-it/strings.xml index d88d134ca..7b697bbab 100644 --- a/commons/src/main/res/values-it/strings.xml +++ b/commons/src/main/res/values-it/strings.xml @@ -105,6 +105,7 @@ Stringa da aggiungere %Y - anno\n%M - mese\n%D - giorno\n%h - ora\n%m - minuto\n%s - secondo\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Copia diff --git a/commons/src/main/res/values-iw/strings.xml b/commons/src/main/res/values-iw/strings.xml index 15645f5f7..8f970954f 100644 --- a/commons/src/main/res/values-iw/strings.xml +++ b/commons/src/main/res/values-iw/strings.xml @@ -105,6 +105,7 @@ מחרוזת להוספה %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) העתק diff --git a/commons/src/main/res/values-ja/strings.xml b/commons/src/main/res/values-ja/strings.xml index e472a88ce..5ecc0313c 100644 --- a/commons/src/main/res/values-ja/strings.xml +++ b/commons/src/main/res/values-ja/strings.xml @@ -105,6 +105,7 @@ 追加する文字列 %Y - 年\n%M - 月\n%D - 日\n%h - 時\n%m - 分\n%s - 秒\n%i - 1から増える数 Filename (without .txt) + Filename (without .json) コピー diff --git a/commons/src/main/res/values-ko-rKR/strings.xml b/commons/src/main/res/values-ko-rKR/strings.xml index 0f3b997ba..e3a04e16b 100644 --- a/commons/src/main/res/values-ko-rKR/strings.xml +++ b/commons/src/main/res/values-ko-rKR/strings.xml @@ -105,6 +105,7 @@ 추가할 문장 %Y - 년\n%M - 월\n%D - 일\n%h - 시\n%m - 분\n%s - 초\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) 복사 diff --git a/commons/src/main/res/values-lt/strings.xml b/commons/src/main/res/values-lt/strings.xml index 1fe4efbe3..15db24f8a 100644 --- a/commons/src/main/res/values-lt/strings.xml +++ b/commons/src/main/res/values-lt/strings.xml @@ -105,6 +105,7 @@ Pridedama eilutė %Y - metai\n%M - mėnuo\n%D - diena\n%h - valanda\n%m - minutė\n%s - sekundė\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Kopijuoti diff --git a/commons/src/main/res/values-nb/strings.xml b/commons/src/main/res/values-nb/strings.xml index 0ccc79131..9a2510e9b 100644 --- a/commons/src/main/res/values-nb/strings.xml +++ b/commons/src/main/res/values-nb/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Kopier diff --git a/commons/src/main/res/values-nl/strings.xml b/commons/src/main/res/values-nl/strings.xml index 1ba15f293..b13ce589c 100644 --- a/commons/src/main/res/values-nl/strings.xml +++ b/commons/src/main/res/values-nl/strings.xml @@ -105,6 +105,7 @@ Tekens toevoegen %Y - jaar\n%M - maand\n%D - dag\n%h - uur\n%m - minuut\n%s - seconde\n%i - getal oplopend vanaf 1 Filename (without .txt) + Filename (without .json) Kopiëren diff --git a/commons/src/main/res/values-no/strings.xml b/commons/src/main/res/values-no/strings.xml index 7e782fdcd..30dca5b19 100644 --- a/commons/src/main/res/values-no/strings.xml +++ b/commons/src/main/res/values-no/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Kopier diff --git a/commons/src/main/res/values-pl/strings.xml b/commons/src/main/res/values-pl/strings.xml index 708698aad..85cec5be1 100644 --- a/commons/src/main/res/values-pl/strings.xml +++ b/commons/src/main/res/values-pl/strings.xml @@ -105,6 +105,7 @@ Ciąg do dodania %Y - rok\n%M - miesiąc\n%D - dzień\n%h - godzina\n%m - minuta\n%s - sekunda\n%i - numer rosnący od 1 Filename (without .txt) + Filename (without .json) Kopiuj diff --git a/commons/src/main/res/values-pt-rBR/strings.xml b/commons/src/main/res/values-pt-rBR/strings.xml index bd87da2c1..a36e35406 100644 --- a/commons/src/main/res/values-pt-rBR/strings.xml +++ b/commons/src/main/res/values-pt-rBR/strings.xml @@ -105,6 +105,7 @@ Texto a adicionar %Y - ano\n%M - mês\n%D - dia\n%h - hora\n%m - minuto\n%s - segundo\n%i – aumento numérico de 1 Filename (without .txt) + Filename (without .json) Copiar diff --git a/commons/src/main/res/values-pt/strings.xml b/commons/src/main/res/values-pt/strings.xml index daa516d9b..658aabf0f 100644 --- a/commons/src/main/res/values-pt/strings.xml +++ b/commons/src/main/res/values-pt/strings.xml @@ -105,6 +105,7 @@ Texto a adicionar %Y - ano\n%M - mês\n%D - dia\n%h - horas\n%m - minutos\n%s - segundos\n%i - incremento númerico a partir de 1 Filename (without .txt) + Filename (without .json) Copiar diff --git a/commons/src/main/res/values-ru/strings.xml b/commons/src/main/res/values-ru/strings.xml index 456fc9deb..6b27cad1c 100644 --- a/commons/src/main/res/values-ru/strings.xml +++ b/commons/src/main/res/values-ru/strings.xml @@ -105,6 +105,7 @@ Строка для добавления %Y - год\n%M - месяц\n%D - день\n%h - час\n%m - минута\n%s - секунда\n%i - порядковый номер с 1 Filename (without .txt) + Filename (without .json) Копировать diff --git a/commons/src/main/res/values-sk/strings.xml b/commons/src/main/res/values-sk/strings.xml index a6256f55a..217db4a40 100644 --- a/commons/src/main/res/values-sk/strings.xml +++ b/commons/src/main/res/values-sk/strings.xml @@ -105,6 +105,7 @@ Reťazec na pridanie %Y - rok\n%M - mesiac\n%D - deň\n%h - hodina\n%m - minúta\n%s - sekunda\n%i - číslo narastajúce od 1 Názov súboru (bez .txt) + Názov súboru (bez .json) Kopírovať diff --git a/commons/src/main/res/values-sl/strings.xml b/commons/src/main/res/values-sl/strings.xml index d61686321..3b5071f62 100644 --- a/commons/src/main/res/values-sl/strings.xml +++ b/commons/src/main/res/values-sl/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Kopiraj diff --git a/commons/src/main/res/values-sr/strings.xml b/commons/src/main/res/values-sr/strings.xml index 6361d8bfa..1264b0497 100644 --- a/commons/src/main/res/values-sr/strings.xml +++ b/commons/src/main/res/values-sr/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Копирај diff --git a/commons/src/main/res/values-sv/strings.xml b/commons/src/main/res/values-sv/strings.xml index a519b6e7e..d618931e6 100644 --- a/commons/src/main/res/values-sv/strings.xml +++ b/commons/src/main/res/values-sv/strings.xml @@ -105,6 +105,7 @@ String to add %Y - år\n%M - månad\n%D - dag\n%h - timme\n%m - minut\n%s - sekund\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Kopiera diff --git a/commons/src/main/res/values-ta/strings.xml b/commons/src/main/res/values-ta/strings.xml index 614b2f805..6e732d2df 100644 --- a/commons/src/main/res/values-ta/strings.xml +++ b/commons/src/main/res/values-ta/strings.xml @@ -105,6 +105,7 @@ சேர்க்க வேண்டிய சரம் %Y - ஆண்டு\n%M - மாதம்\n%D - நாள்\n%h - மணி\n%m - நிமிடம்\n%s - விநாடிகள்\n%i - 1 இலிருந்து அதிகரிக்கும் எண் Filename (without .txt) + Filename (without .json) நகலெடுக்கவும் diff --git a/commons/src/main/res/values-tr/strings.xml b/commons/src/main/res/values-tr/strings.xml index 4a1c71831..c20cdd222 100644 --- a/commons/src/main/res/values-tr/strings.xml +++ b/commons/src/main/res/values-tr/strings.xml @@ -105,6 +105,7 @@ Eklenecek dize %Y - yıl\n%M - ay\n%D - gün\n%h - saat\n%m - dakika\n%s - saniye\n%i - 1\'den artan sayı Filename (without .txt) + Filename (without .json) Kopyala diff --git a/commons/src/main/res/values-uk/strings.xml b/commons/src/main/res/values-uk/strings.xml index 74413c08f..4afff8b1d 100644 --- a/commons/src/main/res/values-uk/strings.xml +++ b/commons/src/main/res/values-uk/strings.xml @@ -105,6 +105,7 @@ Рядок для додавання %Y - рік\n%M - місяць\n%D - день\n%h - година\n%m - хвилина\n%s - секунда\n%i - номер від 1 Filename (without .txt) + Filename (without .json) Копіювати diff --git a/commons/src/main/res/values-vi/strings.xml b/commons/src/main/res/values-vi/strings.xml index 38e8746d3..75e17c40f 100644 --- a/commons/src/main/res/values-vi/strings.xml +++ b/commons/src/main/res/values-vi/strings.xml @@ -105,6 +105,7 @@ Chuỗi để thêm %Y - năm\n%M - tháng\n%D - ngày\n%h - giờ\n%m - phút\n%s - giây\n%i - số tăng từ 1 Filename (without .txt) + Filename (without .json) Sao chép diff --git a/commons/src/main/res/values-zh-rCN/strings.xml b/commons/src/main/res/values-zh-rCN/strings.xml index e71da72c6..aa5e722e9 100644 --- a/commons/src/main/res/values-zh-rCN/strings.xml +++ b/commons/src/main/res/values-zh-rCN/strings.xml @@ -105,6 +105,7 @@ 要添加的字符串 %Y - 年\n%M - 月\n%D - 日\n%h - 时\n%m - 分\n%s - 秒\n%i - 数字从1递增 Filename (without .txt) + Filename (without .json) 复制 diff --git a/commons/src/main/res/values-zh-rTW/strings.xml b/commons/src/main/res/values-zh-rTW/strings.xml index d32781a11..43ab86391 100644 --- a/commons/src/main/res/values-zh-rTW/strings.xml +++ b/commons/src/main/res/values-zh-rTW/strings.xml @@ -105,6 +105,7 @@ 添加文字 %Y - 年\n%M - 月\n%D - 日\n%h - 小時\n%m - 分鐘\n%s - 秒鐘\n%i - 數字從1增加起 Filename (without .txt) + Filename (without .json) 複製 diff --git a/commons/src/main/res/values/strings.xml b/commons/src/main/res/values/strings.xml index 11e11aa71..38811b62f 100644 --- a/commons/src/main/res/values/strings.xml +++ b/commons/src/main/res/values/strings.xml @@ -105,6 +105,7 @@ String to add %Y - year\n%M - month\n%D - day\n%h - hour\n%m - minute\n%s - second\n%i - number increasing from 1 Filename (without .txt) + Filename (without .json) Copy From fb3b9c1c83b0b5b5429989a1fc79c3133d61ae05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Solatec=20Inform=C3=A0tica?= <35220662+Solatec@users.noreply.github.com> Date: Tue, 21 Sep 2021 12:25:55 +0200 Subject: [PATCH 14/34] Update strings.xml --- commons/src/main/res/values-ca/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/main/res/values-ca/strings.xml b/commons/src/main/res/values-ca/strings.xml index 83204f560..e5d0edcdc 100644 --- a/commons/src/main/res/values-ca/strings.xml +++ b/commons/src/main/res/values-ca/strings.xml @@ -104,8 +104,8 @@ Patró Cadena per afegir %Y - any\n%M - mes\n%D - dia\n%h - hora\n%m - minut\n%s - segon\n%i - nombre augmentant des de 1 - Filename (without .txt) - Filename (without .json) + Nom del fitxer (sense .txt) + Nom del fitxer (sense .json) Copiar From a2ea5bfb20c9f31e5f4040ad23b854b48a3143c9 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Tue, 21 Sep 2021 12:35:49 +0200 Subject: [PATCH 15/34] Dutch --- commons/src/main/res/values-nl/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/main/res/values-nl/strings.xml b/commons/src/main/res/values-nl/strings.xml index b13ce589c..a67f5f349 100644 --- a/commons/src/main/res/values-nl/strings.xml +++ b/commons/src/main/res/values-nl/strings.xml @@ -104,8 +104,8 @@ Patroon Tekens toevoegen %Y - jaar\n%M - maand\n%D - dag\n%h - uur\n%m - minuut\n%s - seconde\n%i - getal oplopend vanaf 1 - Filename (without .txt) - Filename (without .json) + Bestandsnaam (zonder .txt) + Bestandsnaam (zonder .json) Kopiëren From 906c08875b4913071db971aac69f1e23d53a43a2 Mon Sep 17 00:00:00 2001 From: Agnieszka C <85929121+Aga-C@users.noreply.github.com> Date: Tue, 21 Sep 2021 13:04:06 +0200 Subject: [PATCH 16/34] Updated Polish translation --- commons/src/main/res/values-pl/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/main/res/values-pl/strings.xml b/commons/src/main/res/values-pl/strings.xml index 85cec5be1..b4549ec3b 100644 --- a/commons/src/main/res/values-pl/strings.xml +++ b/commons/src/main/res/values-pl/strings.xml @@ -104,8 +104,8 @@ Wzór Ciąg do dodania %Y - rok\n%M - miesiąc\n%D - dzień\n%h - godzina\n%m - minuta\n%s - sekunda\n%i - numer rosnący od 1 - Filename (without .txt) - Filename (without .json) + Nazwa pliku (bez .txt) + Nazwa pliku (bez .json) Kopiuj From a757c30b3a88f086180acc7b35838c7442ea26da Mon Sep 17 00:00:00 2001 From: spkprs Date: Tue, 21 Sep 2021 15:00:17 +0300 Subject: [PATCH 17/34] Update strings.xml --- commons/src/main/res/values-el/strings.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/commons/src/main/res/values-el/strings.xml b/commons/src/main/res/values-el/strings.xml index 55ee431d5..2e592e223 100644 --- a/commons/src/main/res/values-el/strings.xml +++ b/commons/src/main/res/values-el/strings.xml @@ -104,8 +104,8 @@ Μοτίβο Συμβολοσειρά για προσθήκη %Y - έτος\n%M - μήνας\n%D - ημέρα\n%h - ώρα\n%m - λεπτό\n%s - δευτ/το\n%i - αύξηση αριθμού από 1 - Filename (without .txt) - Filename (without .json) + Όνομα αρχείου (χωρίς .txt) + Όνομα αρχείου (χωρίς .json) Αντιγραφή @@ -339,7 +339,7 @@ Εισαγωγή μοτίβου Λάθος μοτίβο Επανάληψη μοτίβου - Biometrics + Βιομετρικά Δακτυλικό αποτύπωμα Προσθήκη δακτυλικού αποτυπώματος Παρακαλώ τοποθετήστε το δάκτυλό σας στον αισθητήρα δακτυλικών αποτυπωμάτων @@ -520,7 +520,7 @@ Μικρό Μεσαίο Μεγάλο - Πολύ Μεγάλο + Τεράστιο Κωδικός προστασίας προβολής κρυφών στοιχείων Κωδικός προστασίας ολόκληρης της εφαρμογής Προστασία με κωδικό για διαγραφή ή μετακίνηση @@ -577,7 +577,7 @@ Ο Κάδος Ανακύκλωσης άδειασε επιτυχώς Τα αρχεία επαναφέρθηκαν επιτυχώς Σίγουρα θέλετε να αδειάσετε τον Κάδο Ανακύκλωσης; Τα αρχεία θα χαθούν οριστικά. - Ο Κάδος Ανακύκλωσης είναι κενός + Ο Κάδος Ανακύκλωσης είναι άδειος Η μετακίνηση στον Κάδο είναι ανενεργή, χρησιμοποιείστε την Επαναφορά Εμφάνιση Κάδου Ανακύκλωσης Απόκρυψη Κάδου Ανακύκλωσης @@ -702,7 +702,7 @@ Γειά σας,\n\nφαίνεται ότι χρησιμοποιείτε αυτήν την εφαρμογή ήδη για αρκετό καιρό, και το εκτιμούμε πραγματικά.\n\nΑν μπορούμε να σας ζητήσουμε μια χάρη, παρακαλούμε αξιολογήστε μας στο Google Play. Αυτό θα μας βοηθούσε πολύ.\n\nΑνεξάρτητα τι αποφασίσατε, δεν θα εμφανιστεί ξανά αυτό το μήνυμα.\n\nΕυχαριστούμε! Βαθμολογήστε την εφαρμογή μας παρακαλώ :) Σας Ευχαριστούμε - Το widget είναι κλειδωμένο.\nΠαρακαλώ αναβαθμίστε σε Pro έκδοση, για να το ξεκλειδώστε το. + Το widget είναι κλειδωμένο.\nΠαρακαλώ αναβαθμίστε σε Pro έκδοση, για να το ξεκλειδώσετε. Παρακαλώ αγοράστε το Simple Thank You για να το ξεκλειδώσετε. @@ -824,7 +824,7 @@ Λίστες ελέγχου - Διαφορετική σημείωση και χρώματα ανά γραφικό συστατικό + Διαφορετική σημείωση και χρώματα ανά γραφικό στοιχείο Κλείδωμα Σημείωσης From 4f47f5767852fd37846dbd290e024b842bc2b421 Mon Sep 17 00:00:00 2001 From: teemue Date: Tue, 21 Sep 2021 19:59:09 +0300 Subject: [PATCH 18/34] Improved FI translation --- commons/src/main/res/values-fi/strings.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commons/src/main/res/values-fi/strings.xml b/commons/src/main/res/values-fi/strings.xml index 77e85db36..74e2c2442 100644 --- a/commons/src/main/res/values-fi/strings.xml +++ b/commons/src/main/res/values-fi/strings.xml @@ -104,8 +104,8 @@ Kuvio Lisättävä merkkijono %Y - vuosi\n%M - kuukausi\n%D - päivä\n%h - tunti\n%m - minuutti\n%s - sekunti\n%i - nouseva numero, alkaen numerosta 1 - Filename (without .txt) - Filename (without .json) + Tiedostonimi (ilman .txt-päätettä) + Tiedostonimi (ilman .json-päätettä) Kopioi From 141b140863403b86aad3f1f0630feffa39fdf1c8 Mon Sep 17 00:00:00 2001 From: 10cents Date: Wed, 22 Sep 2021 11:08:29 +0200 Subject: [PATCH 19/34] Update strings.xml --- commons/src/main/res/values-da/strings.xml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/commons/src/main/res/values-da/strings.xml b/commons/src/main/res/values-da/strings.xml index c03dd7188..41c266d77 100644 --- a/commons/src/main/res/values-da/strings.xml +++ b/commons/src/main/res/values-da/strings.xml @@ -1,7 +1,7 @@ OK Annuller - Nothing + Intet Senere Gem som Fil gemt @@ -56,8 +56,8 @@ Blokér nummer Blokér numre Blokerede numre - Export blocked numbers - Import blocked numbers + Eksporter blokerede numre + Importer blokerede numre Du skal gøre denne app til standardopkaldsappen for at gøre brug af blokerede numre. Gør til standard Er du sikker på at du vil blokere \"%s\"? @@ -104,8 +104,8 @@ Mønster Tekststreng der skal tilføjes %Y - år\n%M - måned\n%D - dag\n%h - time\n%m - minut\n%s - sekund\n%i - tal stigende fra 1 - Filename (without .txt) - Filename (without .json) + Filenavn (uden .txt) + Filenavn (uden .json) Kopier @@ -294,7 +294,7 @@ Navn Størrelse Senest ændret - Date created + Oprettelsesdato Eksponeringsdato Titel Filnavn @@ -319,7 +319,7 @@ Er du sikker på at du vil slette dette? Er du sikker på at du vil flytte dette til papirkurven? Spørg ikke igen i denne session - Do not show again + Vis ikke dette igen Ja Nej Måske @@ -343,8 +343,8 @@ Fingeraftryk Tilføj fingeraftryk Sæt din finger på sensoren - Open biometric ID verification dialog - Authenticate + Åbn dialogboksen til verifikation af biometrisk ID + Godkend Godkendelsen fejlede Godkendelse blokeret, prøv igen om lidt Du har ingen registrerede fingeraftryk, tilføj nogle i indstillingerne på din enhed From f7575dcaa1848f15241beff39121ac01e7dc3e65 Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 22 Sep 2021 22:40:00 +0200 Subject: [PATCH 20/34] make sure we show the Use Default button when picking navigation bar color --- .../commons/activities/CustomizationActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt index d8a0e0271..84063b541 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt @@ -479,7 +479,7 @@ class CustomizationActivity : BaseSimpleActivity() { } private fun pickNavigationBarColor() { - ColorPickerDialog(this, curNavigationBarColor, true, true, currentColorCallback = { + ColorPickerDialog(this, curNavigationBarColor, true, true, true, currentColorCallback = { updateNavigationBarColor(it) }, callback = { wasPositivePressed, color -> if (wasPositivePressed) { From c87db3b195bc9f003ff772fa820006302d8c5651 Mon Sep 17 00:00:00 2001 From: solokot Date: Fri, 24 Sep 2021 15:36:30 +0300 Subject: [PATCH 21/34] Updated Russian language --- commons/src/main/res/values-ru/strings.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/commons/src/main/res/values-ru/strings.xml b/commons/src/main/res/values-ru/strings.xml index 6b27cad1c..6bcd5a427 100644 --- a/commons/src/main/res/values-ru/strings.xml +++ b/commons/src/main/res/values-ru/strings.xml @@ -103,9 +103,9 @@ Простое переименование Шаблон Строка для добавления - %Y - год\n%M - месяц\n%D - день\n%h - час\n%m - минута\n%s - секунда\n%i - порядковый номер с 1 - Filename (without .txt) - Filename (without .json) + %Y — год\n%M — месяц\n%D — день\n%h — час\n%m — минута\n%s — секунда\n%i — порядковый номер с 1 + Имя файла (без .txt) + Имя файла (без .json) Копировать @@ -521,8 +521,8 @@ - Время, оставшееся до срабатывания будильника:\n%s - Время, оставшееся до срабатывания напоминания:\n%s + Время до срабатывания будильника:\n%s + Время до срабатывания напоминания:\n%s Убедитесь, что будильник работает правильно, прежде чем полагаться на него. Он может не работать должным образом из-за системных ограничений, связанных с экономией батареи. Убедитесь, что напоминания работают правильно, прежде чем полагаться на них. Они могут не работать должным образом из-за системных ограничений, связанных с экономией батареи. Уведомления этого приложения отключены. Перейдите в настройки устройства и включите их. From 294b3bfbdd201771e10418315901e0a74df3ce56 Mon Sep 17 00:00:00 2001 From: darthpaul Date: Fri, 24 Sep 2021 14:13:12 +0100 Subject: [PATCH 22/34] Add method to determine if a contact has a particular number - Add SimpleContact.doesHavePhoneNumber method to check if a contact has a particular number - it performs equality check, so the numbers match exactly - --- .../commons/models/SimpleContact.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/models/SimpleContact.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/models/SimpleContact.kt index 071230973..0b4cebbc4 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/models/SimpleContact.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/models/SimpleContact.kt @@ -44,4 +44,24 @@ data class SimpleContact(val rawId: Int, val contactId: Int, var name: String, v false } } + + fun doesHavePhoneNumber(text: String): Boolean { + return if (text.isNotEmpty()) { + val normalizedText = text.normalizePhoneNumber() + if (normalizedText.isEmpty()) { + phoneNumbers.any { phoneNumber -> + phoneNumber == text + } + } else { + phoneNumbers.any { phoneNumber -> + PhoneNumberUtils.compare(phoneNumber.normalizePhoneNumber(), normalizedText) || + phoneNumber == text || + phoneNumber.normalizePhoneNumber() == normalizedText || + phoneNumber == normalizedText + } + } + } else { + false + } + } } From 265cdf3b0ac40263a1e5f386a0c760c9de7e06bd Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 24 Sep 2021 17:40:37 +0200 Subject: [PATCH 23/34] adding some PIN icons --- commons/src/main/res/drawable-hdpi/ic_pin.png | Bin 0 -> 1099 bytes commons/src/main/res/drawable-xhdpi/ic_pin.png | Bin 0 -> 1305 bytes commons/src/main/res/drawable-xxhdpi/ic_pin.png | Bin 0 -> 2670 bytes commons/src/main/res/drawable-xxxhdpi/ic_pin.png | Bin 0 -> 2755 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 commons/src/main/res/drawable-hdpi/ic_pin.png create mode 100644 commons/src/main/res/drawable-xhdpi/ic_pin.png create mode 100644 commons/src/main/res/drawable-xxhdpi/ic_pin.png create mode 100644 commons/src/main/res/drawable-xxxhdpi/ic_pin.png diff --git a/commons/src/main/res/drawable-hdpi/ic_pin.png b/commons/src/main/res/drawable-hdpi/ic_pin.png new file mode 100644 index 0000000000000000000000000000000000000000..a535b3ee2256e4a16052591acc6a2d36d322f41a GIT binary patch literal 1099 zcmV-R1ho5!P)~51{m1_J+pbsj7NNs%)3Xwuk1VIpl zAVLMH8ms7wqAvxDc~TLoqNs=u0Y#CZ#*$P-(1#={v_X@&#^QwC;7FIaog|y=?qvS% z=flpX*LHTZ3$w=acITd-Z_YjUo_h`HkN^ioWJpBr5|LdZvM3_sB67+wjI~b1Z3Oce zU~{>IfC&r%UH=tKKj6f`=%RoxfEzjulLk)Lqx!x-Zkp!p6B85H*tY#d7>2(nrF5_b z;I>Wz^#FeX1VONx%jIsoWWIZKb@in%4D}4=fm=ES)T`A_zLDP2($b*gI6Bl%z*U_9 zx)L}SWvFUd)*X#>XJ=>cc3pQ}gL*x2pa^QD9${^5?ZalerBdmLQYwhlSAbiShS>vr zwYA5?kj2HtI~(cG%*^cC*w{FwW$CpfVfujYw)VAB%C_y%?d(j`?2nECfZvmXxe54L zbL89tBPSF9S~lgTNp9G692e_LGy7199KOFl-$NNC6K5 zKTtdR8_MS9reoW7EX?})`s0AAR4Shri^TyE5z{ogEz5dG%k0_hV6Fo`2E1k<0G{XN zvf1o?aeiFaeOM{Ab?yW~0FYNoSy4s-0^nFPnCpRQJ*eY2DhPs+d_F&Hn&$K6a(Sd$ ztzHPj(5zOg`{MjqmNn@6{&u~M=*Jt^9PnISGYrFOsZ@G%Y;5f67(HWjbTl33V_{+8 zfa5r>7IX?Y3CsZJfo0$<@Fb9F2onYRvhJl&C_DogO${!$-=~zyYB0Y6ebHPuaBZ{- zE$u`BzOQ>4A0I#54$SiMabmZG+OW4(yQV;f zVVoC{_eDffsgx+CKFQ^BEjjP$=~>im1rky6{qj}Q^1}U>;|-g{;Zvt&6Z3I z!>~o%dUEcAShdb`bbc%K{pJ{%sc6n*>aE6uf>f2!L16p1#yx z7td0A7RTL@+B%(^!DN89V_;$%E3lW^jqzRJTi|QpRp3BUFdt}X_ox+gTU|ae0iM!e zeBcGz=wC_0>;}$gFvoWUL<2e$Ezt~cbSGJi2xz~E>=uy)!!R~?66k*?{{Uffd|$F* RT8jVx002ovPDHLkV1gQ5|EvH2 literal 0 HcmV?d00001 diff --git a/commons/src/main/res/drawable-xhdpi/ic_pin.png b/commons/src/main/res/drawable-xhdpi/ic_pin.png new file mode 100644 index 0000000000000000000000000000000000000000..a18e7dda5bc8bce7c1359023a55eabd3469c33f0 GIT binary patch literal 1305 zcmV+!1?KvRP)R#DORdg(~8Pq9D#MRcWOP^$jYrAX6l3>4ae|7^GMBAv8ofo4#asX_ITO z$&O zL_|hMM|(1v%<1*@^>RhzfY+N{z+R`3X_{1On@A+iS9ls{w$ix>;J6~w=hoh~?O-O8 zDObcPXFFeGwTq}Jm*4Ln)ph-VX_}^T>mA@=9lg8(>~{|1;^Jb&OTSPkwA(O@IprzD zfYwGk7Xbu-6{kfw9Ny=pZzK{4+P1B}O7At=xdh-_r-5ZzVXu8-vDnK>0VdGiNZ%rW zhk$?7VVs_xe%fn{<>lpw(*2c2Iu`&A0V!2Jkw|!c0wN;OXjGjDFEmK`KY(X}HC0~M z_2CW1D|(IU?W-nxgZwO7#N6E6h8JpOS{Y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z+_LWgj+k$^sQAn8N` zL0Hm&q#;QI#u!h|j(Gx5mu)#tUlkyReQLPW6q=7N1$3(qfM2lKW|H{;d$xHvPs@n{ z50EpJpEdxO<8nSLYn)p-9sZk&6WFG;4|f=gtigNPG5`Po07*qoM6N<$f-_+#kN^Mx literal 0 HcmV?d00001 diff --git a/commons/src/main/res/drawable-xxxhdpi/ic_pin.png b/commons/src/main/res/drawable-xxxhdpi/ic_pin.png new file mode 100644 index 0000000000000000000000000000000000000000..a7cd80df630fdaef43bb708662f14dbb385efeac GIT binary patch literal 2755 zcmV;!3Ox0RP)GUH_lZ;8*(M~_6ZPGDmTAfZi z?Myp~9h+KbOjFH>Q!t_lGA7iqqDC>WRv-vbh>@(=6=XyN1+uHy71m{4cJI?aSUSey zy=Qmt-i5pOnK^&mbMHO(_nzd6(i4Cv= zzzbUOoK7c7OG}po0)dl?q97?L>7gY{mN*tJTnHh;#uEUrS_rWt(Q|(~$$qUYTToE& zSbu*%Nd8}FZ*Rxu&6~459#15t;ZKQffNyINTDNZ9h~V!GE|&{0zx*(;Q~4~Jkdh%H;T;MT2M z;TYldL^MFP8jWB<598R7*iO$Z>aE$QdyQS5v6HKbbJ}D`>&t9}>5t5UWMPp;5 z>@9^PA5J6#^r>C!?CgyC1=FWb$L!g&#j#_@PDwG%QQCkP)hgu9&Q2-2Jd+_`HICSXH9*MRfKypzc7$8TB zM0t6+ZU!KU{{DWPJ$qKBK|XW);*Ke+AR$CMfb(i`CQX{uK~lGOrlqA}!h{LJ?RINL zod@8%iBJmus+ASre*0}*O94p~6%|3E6f~NCfJQP`bNceyH9DP6-HlLDQBf^nglEhQ zKZWGGG8OVW@4WL{y$#Ub-Yzp*K4w<<_mDg$J4Eg4>*Lj{S9LE1g@uL7C3-|zW`mzi z(k=_Xr>BRfPoLHuK1sB-wPA2@P%8;9mT^)g|?eb@;ywHD*#OEG%3;I5=ns{NXS#Frb>Iu?k+0+z{6K;H$413Vt~B_V%i# zONJ~32x7m_?nGANOWK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-Md%D`RcG4;b$-gKTJ>*g$EBF+||&~pb6jUbi(D5a^HO1Z1AUW=q!C1-H`1a z-KmdbOQJ%fUigT-nO@0PI;12T{EzjXWeg4Se#)UAY-*K22gz5$srp9sIDq6l0F}_#5fjpf0G<{? z^u;(sOvTWF7c&8j1E65YUH*K?O$Lcr?bMJ=ho!i{uOK Date: Fri, 24 Sep 2021 17:43:55 +0200 Subject: [PATCH 24/34] adding some icons for removing pinning --- commons/src/main/res/drawable-hdpi/ic_unpin.png | Bin 0 -> 1167 bytes commons/src/main/res/drawable-xhdpi/ic_unpin.png | Bin 0 -> 1276 bytes .../src/main/res/drawable-xxhdpi/ic_unpin.png | Bin 0 -> 2747 bytes .../src/main/res/drawable-xxxhdpi/ic_unpin.png | Bin 0 -> 2238 bytes 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 commons/src/main/res/drawable-hdpi/ic_unpin.png create mode 100644 commons/src/main/res/drawable-xhdpi/ic_unpin.png create mode 100644 commons/src/main/res/drawable-xxhdpi/ic_unpin.png create mode 100644 commons/src/main/res/drawable-xxxhdpi/ic_unpin.png diff --git a/commons/src/main/res/drawable-hdpi/ic_unpin.png b/commons/src/main/res/drawable-hdpi/ic_unpin.png new file mode 100644 index 0000000000000000000000000000000000000000..91845ba743bdf55bc5d46fe127da76f7fce1b2c7 GIT binary patch literal 1167 zcmV;A1aSL_P)}$0fhjI_GiEo*?##~4 zoSzRflb+qoZF8Z1k8{5Hf4}+u=QbI!NdfE=Li7nCZV^JX3n6BN5JN(UGnq`Lv{`kd zU>*ewR)-5{Kp)W2ir}^Dfaw9u5EwNi@F}n>jo_U?2{-|4X%VIk_#&uUuh)k(O}lY; zc=&R|FdlbZ_ctk}3YG(Ih!fle{1xZ{ueAaNTmhT|a2#hLpU+?2G~T(eu<)Ymx@re! zf$QQ#dx2#I>O>1byOp^!8yyME!CR`S>;tv|p9es$ z>oPMlb8}Sw#Kc7V($dlyrAsH1fGz=EP@p311NH#l21!y%X&A=Gu?2(>nx^&OZ36&* zCglfEF9UXzeZV!quZpl)C=_1OG_5nSfDl4n*bC}u@`L^5l`#8&t-ueeO+as$&dA8f z!LaA9>!t_tJ9Izrqtbx}`+#oXoMl<2VHlw>i;Iho0kTr5d{QhH4+ zl#b(^HVoqwDK}4D*L&;rdeYg3|KZVd4tO@mbX~VvE|=dL92~q%89&x!;i}b_%jNc( zrdd;RMu7of0{9#F2N(yAHoqGN^jV-%C={LsGEL)cz)8PD4fgrtT~f-k3d|qC9)GM8 z*y+2FY9$KbyFh7ZXz136oOa+1rBmwa+mC+Yw8Wgc@`x~Gw0cs%3KH^UC7J<6_Nr&sYSeA81LVmkH(JRgNZCC*Pfo;`l z^?W{`-<{%}dlje^`!)(_C-8d!Rj=1afo&um` z3iBr32@KvnXu$8-KHw)-Uqxiovn;Sf(Y%MXtUkPRW`GNqF~@Inhmx}$cn0scSiRl` zah{Of88`%#Q`_fv;O!8YOho<;y#Kg&fvc1#3$2SWkRR9Nkiza|07n3F919b}_whAF~ hnM}sIm_Yx#_zysHesYrBp}PP8002ovPDHLkV1mxVB9Q<9 literal 0 HcmV?d00001 diff --git a/commons/src/main/res/drawable-xhdpi/ic_unpin.png b/commons/src/main/res/drawable-xhdpi/ic_unpin.png new file mode 100644 index 0000000000000000000000000000000000000000..fee0ef4bc1a3c3ed94c2c9fb31035893441964bc GIT binary patch literal 1276 zcmVUN(r}=S{snm2hxzp|fQMUY_99RQPPNH= z5Xd;4S(X(`CX@R`M8?O*_nD@7tW+wwL6m_bewrPw7OlsIA%LAuNBMl7M!DH+_S*)l zaa_0A8!p8gf&dOGdSS18+qOfdX}Uoi)opmJoe;pF9{>@NSS%JY48u_BO28i7rpMa_ z0qk;$EG{m_b?PFKNWWnibBc#Fuys=*fGxm^QzROV-lbC;kHpfG2@})Ph7JG2*NF1wCivTM_8hg#ccmc0&YUZf>sS zLCvyiXTX+3st{+qAb@_9iL+EHVcT}dOM7Bs;svkg<#NsYSZ&4p<-n`JITrvG;{J7r zVz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VX-+uK%Fl}q$G5m_uE84-CwM0U=648w40 za(c_-4YLAxQq*^UMMR`mL=t{CXGd@ZM{oo+;QxvF`s;T+KY;)M002ovPDHLkV1g`6 BEam_J literal 0 HcmV?d00001 diff --git a/commons/src/main/res/drawable-xxxhdpi/ic_unpin.png b/commons/src/main/res/drawable-xxxhdpi/ic_unpin.png new file mode 100644 index 0000000000000000000000000000000000000000..94f5fa49ad052e9e8aa209893562f385b150315f GIT binary patch literal 2238 zcmV;v2toIWP)twKs2s1F)iohrXWfT+zi!kz#aU1~wD+7*>f5?cA zuVE&snrhIrB@B}kV$F>9G3kS?eX%CchBO&SjiK#?l0e&R+R(J_(7bj({;^jlQQ=lj`v_B?*)Tt`Y+z$GGblZad_BJ)LLLPXvZk;5X=E+RdS<76b3 zR@2V~o&>t_*D&xRa0f6ecCT>r9{}DZKfMV&2+WS13~u~6Km&So2v`c76+5eD{&~PF z=vN!?sn}s}^Unr0VoqbguYt1I?WqC$6g%1jEU?|Uhk;taiKzLP0`Fr_$AK@~YTP40 z)~$F&6d?f5skk;UFhFf>?e+itznYqwE8E-K$!4?pKo|!eHQli9PBNb;LI5rR{_W@1 ziWMssdzDjNU0sn*r}F{v3sVhSI)(X>g8=xo^UiU9(!%On61k^cVv zAP~N#vvJi?hXA~68i0sMM@NS$fcJr`O9leaYy*IZ$hK|UUQ_hqAaI_}MlO#k1mGF3 zfa>b%mguZ+%a$!KDSA<@yP?02A_U-3uVDK7`_Wxzb8~Z(f)5kG=X5vr4^e{vT%vm( zprU>I_Nn;rhW5>!h(dVNE0AO|*=M5O6DLln_;9!Ne%CexU|ASXfm^qqI*oV`B?!PL zeU~qfA2$Lakx1-P@Zb(p4G+CL0?L3ts|3;5*!Uw8F(}NIx10RtoeB#AFc;XaIzu{j z>XebEpsucNiNc6zz9|SdgaHAl0A5!$|LD=9nCu3}$H)Cbc*JBMY!w1<1@N}2`TO_p zH)_6!$hvjwR{4ZcZ+awhgUZH8p%C19hE&bpy?ghF#Yv%;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?U94Rrm-O)WJ3Z9Mn z%a7L*zvx&yfN#X+hYR54*!=L!zd~X58JlkqKuv6Zc;=t&bNfkbzF`2jPGfuw%GJ7Y#uotfPzBL5VT^&-+9`hI7uSg~ToiZw&^AJ+4}T8|`JY5)KL M07*qoM6N<$f*TSr2mk;8 literal 0 HcmV?d00001 From 345239c31deab03f0b1b9a33fcca9823b604cfc4 Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 24 Sep 2021 23:03:28 +0200 Subject: [PATCH 25/34] lets show the recent colors by default at color customization screen --- .../commons/activities/CustomizationActivity.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt index 84063b541..b5ef90472 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt @@ -420,7 +420,7 @@ class CustomizationActivity : BaseSimpleActivity() { private fun isCurrentBlackAndWhiteTheme() = curTextColor == Color.WHITE && curPrimaryColor == Color.BLACK && curBackgroundColor == Color.BLACK private fun pickTextColor() { - ColorPickerDialog(this, curTextColor) { wasPositivePressed, color -> + ColorPickerDialog(this, curTextColor, true) { wasPositivePressed, color -> if (wasPositivePressed) { if (hasColorChanged(curTextColor, color)) { setCurrentTextColor(color) @@ -432,7 +432,7 @@ class CustomizationActivity : BaseSimpleActivity() { } private fun pickBackgroundColor() { - ColorPickerDialog(this, curBackgroundColor) { wasPositivePressed, color -> + ColorPickerDialog(this, curBackgroundColor, true) { wasPositivePressed, color -> if (wasPositivePressed) { if (hasColorChanged(curBackgroundColor, color)) { setCurrentBackgroundColor(color) @@ -468,7 +468,7 @@ class CustomizationActivity : BaseSimpleActivity() { } private fun pickAccentColor() { - ColorPickerDialog(this, curAccentColor) { wasPositivePressed, color -> + ColorPickerDialog(this, curAccentColor, true) { wasPositivePressed, color -> if (wasPositivePressed) { if (hasColorChanged(curAccentColor, color)) { curAccentColor = color From 085b497ed02edda9bfc20b2c0de91837536c85da Mon Sep 17 00:00:00 2001 From: tibbi Date: Fri, 24 Sep 2021 23:07:43 +0200 Subject: [PATCH 26/34] lets always show recent colors, because why not --- .../activities/CustomizationActivity.kt | 47 ++++++++++++++----- .../commons/dialogs/ColorPickerDialog.kt | 6 +-- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt index b5ef90472..351a86db1 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/activities/CustomizationActivity.kt @@ -125,10 +125,31 @@ class CustomizationActivity : BaseSimpleActivity() { private fun setupThemes() { predefinedThemes.apply { - put(THEME_LIGHT, MyTheme(R.string.light_theme, R.color.theme_light_text_color, R.color.theme_light_background_color, R.color.color_primary, R.color.color_primary)) - put(THEME_DARK, MyTheme(R.string.dark_theme, R.color.theme_dark_text_color, R.color.theme_dark_background_color, R.color.color_primary, R.color.color_primary)) + put( + THEME_LIGHT, + MyTheme( + R.string.light_theme, + R.color.theme_light_text_color, + R.color.theme_light_background_color, + R.color.color_primary, + R.color.color_primary + ) + ) + put( + THEME_DARK, + MyTheme(R.string.dark_theme, R.color.theme_dark_text_color, R.color.theme_dark_background_color, R.color.color_primary, R.color.color_primary) + ) //put(THEME_SOLARIZED, MyTheme(R.string.solarized, R.color.theme_solarized_text_color, R.color.theme_solarized_background_color, R.color.theme_solarized_primary_color)) - put(THEME_DARK_RED, MyTheme(R.string.dark_red, R.color.theme_dark_text_color, R.color.theme_dark_background_color, R.color.theme_dark_red_primary_color, R.color.md_red_700)) + put( + THEME_DARK_RED, + MyTheme( + R.string.dark_red, + R.color.theme_dark_text_color, + R.color.theme_dark_background_color, + R.color.theme_dark_red_primary_color, + R.color.md_red_700 + ) + ) put(THEME_WHITE, MyTheme(R.string.white, R.color.dark_grey, android.R.color.white, android.R.color.white, R.color.color_primary)) put(THEME_BLACK_WHITE, MyTheme(R.string.black_white, android.R.color.white, android.R.color.black, android.R.color.black, R.color.md_grey_black)) put(THEME_CUSTOM, MyTheme(R.string.custom, 0, 0, 0, 0)) @@ -408,11 +429,13 @@ class CustomizationActivity : BaseSimpleActivity() { private fun handleAccentColorLayout() { customization_accent_color_holder.beVisibleIf(curSelectedThemeId == THEME_WHITE || isCurrentWhiteTheme() || curSelectedThemeId == THEME_BLACK_WHITE || isCurrentBlackAndWhiteTheme()) - customization_accent_color_label.text = getString(if (curSelectedThemeId == THEME_WHITE || isCurrentWhiteTheme()) { - R.string.accent_color_white - } else { - R.string.accent_color_black_and_white - }) + customization_accent_color_label.text = getString( + if (curSelectedThemeId == THEME_WHITE || isCurrentWhiteTheme()) { + R.string.accent_color_white + } else { + R.string.accent_color_black_and_white + } + ) } private fun isCurrentWhiteTheme() = curTextColor == DARK_GREY && curPrimaryColor == Color.WHITE && curBackgroundColor == Color.WHITE @@ -420,7 +443,7 @@ class CustomizationActivity : BaseSimpleActivity() { private fun isCurrentBlackAndWhiteTheme() = curTextColor == Color.WHITE && curPrimaryColor == Color.BLACK && curBackgroundColor == Color.BLACK private fun pickTextColor() { - ColorPickerDialog(this, curTextColor, true) { wasPositivePressed, color -> + ColorPickerDialog(this, curTextColor) { wasPositivePressed, color -> if (wasPositivePressed) { if (hasColorChanged(curTextColor, color)) { setCurrentTextColor(color) @@ -432,7 +455,7 @@ class CustomizationActivity : BaseSimpleActivity() { } private fun pickBackgroundColor() { - ColorPickerDialog(this, curBackgroundColor, true) { wasPositivePressed, color -> + ColorPickerDialog(this, curBackgroundColor) { wasPositivePressed, color -> if (wasPositivePressed) { if (hasColorChanged(curBackgroundColor, color)) { setCurrentBackgroundColor(color) @@ -468,7 +491,7 @@ class CustomizationActivity : BaseSimpleActivity() { } private fun pickAccentColor() { - ColorPickerDialog(this, curAccentColor, true) { wasPositivePressed, color -> + ColorPickerDialog(this, curAccentColor) { wasPositivePressed, color -> if (wasPositivePressed) { if (hasColorChanged(curAccentColor, color)) { curAccentColor = color @@ -479,7 +502,7 @@ class CustomizationActivity : BaseSimpleActivity() { } private fun pickNavigationBarColor() { - ColorPickerDialog(this, curNavigationBarColor, true, true, true, currentColorCallback = { + ColorPickerDialog(this, curNavigationBarColor, true, true, currentColorCallback = { updateNavigationBarColor(it) }, callback = { wasPositivePressed, color -> if (wasPositivePressed) { diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt index e6442b260..c5c59aeb4 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt @@ -22,7 +22,6 @@ private const val RECENT_COLORS_NUMBER = 5 class ColorPickerDialog( val activity: Activity, color: Int, - showRecentColors: Boolean = false, val removeDimmedBackground: Boolean = false, showUseDefaultButton: Boolean = false, val currentColorCallback: ((color: Int) -> Unit)? = null, @@ -68,10 +67,7 @@ class ColorPickerDialog( true } newHexField.setText(hexCode) - - if (showRecentColors) { - setupRecentColors() - } + setupRecentColors() } viewHue.setOnTouchListener(OnTouchListener { v, event -> From 3c6e3cd0fd2a56ff5a0e38f44653a30e6e9bde4e Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 25 Sep 2021 12:38:17 +0200 Subject: [PATCH 27/34] reverse the order of recent colors --- .../com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt index c5c59aeb4..70190a94e 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ColorPickerDialog.kt @@ -165,7 +165,7 @@ class ColorPickerDialog( if (recentColors.isNotEmpty()) { recent_colors.beVisible() val squareSize = context.resources.getDimensionPixelSize(R.dimen.colorpicker_hue_width) - recentColors.take(RECENT_COLORS_NUMBER).forEach { recentColor -> + recentColors.take(RECENT_COLORS_NUMBER).reversed().forEach { recentColor -> val recentColorView = ImageView(context) recentColorView.id = View.generateViewId() recentColorView.layoutParams = ViewGroup.LayoutParams(squareSize, squareSize) From b0d8064f17bc3aa800f47d795018c224aaea85de Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 26 Sep 2021 20:28:57 +0200 Subject: [PATCH 28/34] allow disabling cancelOnTouchOutside for casual ConfirmationDialogs --- .../commons/dialogs/ConfirmationDialog.kt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ConfirmationDialog.kt b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ConfirmationDialog.kt index f7e10baa1..bf2821262 100644 --- a/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ConfirmationDialog.kt +++ b/commons/src/main/kotlin/com/simplemobiletools/commons/dialogs/ConfirmationDialog.kt @@ -16,8 +16,10 @@ import kotlinx.android.synthetic.main.dialog_message.view.* * @param negative negative buttons text ID (optional) * @param callback an anonymous function */ -class ConfirmationDialog(activity: Activity, message: String = "", messageId: Int = R.string.proceed_with_deletion, positive: Int = R.string.yes, - negative: Int = R.string.no, val callback: () -> Unit) { +class ConfirmationDialog( + activity: Activity, message: String = "", messageId: Int = R.string.proceed_with_deletion, positive: Int = R.string.yes, + negative: Int = R.string.no, val cancelOnTouchOutside: Boolean = true, val callback: () -> Unit +) { var dialog: AlertDialog init { @@ -25,13 +27,13 @@ class ConfirmationDialog(activity: Activity, message: String = "", messageId: In view.message.text = if (message.isEmpty()) activity.resources.getString(messageId) else message val builder = AlertDialog.Builder(activity) - .setPositiveButton(positive) { dialog, which -> dialogConfirmed() } + .setPositiveButton(positive) { dialog, which -> dialogConfirmed() } if (negative != 0) builder.setNegativeButton(negative, null) dialog = builder.create().apply { - activity.setupDialogStuff(view, this) + activity.setupDialogStuff(view, this, cancelOnTouchOutside = cancelOnTouchOutside) } } From 6e48423a559576bbf213b5ba57a75f0f991bdf4b Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 26 Sep 2021 23:42:15 +0200 Subject: [PATCH 29/34] removing the old bintray upload file --- bintray-upload.gradle | 70 ------------------------------------------- commons/build.gradle | 2 -- 2 files changed, 72 deletions(-) delete mode 100644 bintray-upload.gradle diff --git a/bintray-upload.gradle b/bintray-upload.gradle deleted file mode 100644 index 62b60264c..000000000 --- a/bintray-upload.gradle +++ /dev/null @@ -1,70 +0,0 @@ -apply plugin: 'com.github.dcendents.android-maven' -apply plugin: 'com.jfrog.bintray' - -def siteUrl = 'https://github.com/SimpleMobileTools/Simple-Commons' -def gitUrl = 'https://github.com/SimpleMobileTools/Simple-Commons.git' -group = "com.simplemobiletools" -version = propVersionName - -install { - repositories.mavenInstaller { - pom.project { - packaging 'aar' - name 'Simple Commons' - description = 'Some helper functions, dialogs etc used by multiple simple apps.' - url siteUrl - - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - } - } - developers { - developer { - id 'tibbi' - name 'Tibor Kaputa' - email 'hello@simplemobiletools.com' - } - } - scm { - connection gitUrl - developerConnection gitUrl - url siteUrl - } - } - } -} - -task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' -} - -artifacts { - archives sourcesJar -} - -Properties properties = new Properties() -properties.load(project.rootProject.file('local.properties').newDataInputStream()) - -bintray { - user = properties.getProperty("bintray.user") - key = properties.getProperty("bintray.apikey") - - configurations = ['archives'] - pkg { - repo = "simple-commons" - name = "simple-commons" - websiteUrl = siteUrl - vcsUrl = gitUrl - licenses = ["Apache-2.0"] - publish = true - version { - gpg { - sign = true - passphrase = properties.getProperty("bintray.gpg.password") - } - } - } -} diff --git a/commons/build.gradle b/commons/build.gradle index 9f6978932..9e20ac58b 100644 --- a/commons/build.gradle +++ b/commons/build.gradle @@ -47,5 +47,3 @@ dependencies { kapt 'com.github.bumptech.glide:compiler:4.10.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0' } - -apply from: '../bintray-upload.gradle' From 13bf0ae8ebc03df4f9e35eeb0e60d957de178c3c Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 26 Sep 2021 23:42:48 +0200 Subject: [PATCH 30/34] updating kotlin and gradle --- build.gradle | 4 ++-- commons/build.gradle | 4 +--- gradle/wrapper/gradle-wrapper.properties | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index c91f97031..4a87c2710 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { propTargetSdkVersion = propCompileSdkVersion propVersionCode = 1 propVersionName = '5.34.26' - kotlin_version = '1.5.21' + kotlin_version = '1.5.31' } repositories { @@ -16,7 +16,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:4.2.2' + classpath 'com.android.tools.build:gradle:7.0.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" diff --git a/commons/build.gradle b/commons/build.gradle index 9e20ac58b..11a873097 100644 --- a/commons/build.gradle +++ b/commons/build.gradle @@ -9,8 +9,6 @@ android { defaultConfig { minSdkVersion propMinSdkVersion targetSdkVersion propTargetSdkVersion - versionCode propVersionCode - versionName propVersionName } buildTypes { @@ -29,7 +27,7 @@ android { dependencies { implementation 'com.andrognito.patternlockview:patternlockview:1.0.0' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation 'androidx.constraintlayout:constraintlayout:2.0.4' + implementation 'androidx.constraintlayout:constraintlayout:2.1.1' implementation 'androidx.documentfile:documentfile:1.0.1' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' implementation 'joda-time:joda-time:2.10.3' diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f0799cbe1..f7c8c18a0 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip From 54fdb9b49f6f40afb0095e4a83a6d253f1c123b8 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 27 Sep 2021 09:37:37 +0200 Subject: [PATCH 31/34] removing the no longer needed bintray plugin --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index 4a87c2710..b31aa712d 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,6 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.0.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong From ddc5be152feca9ac88a4e82c9a9ca7fa608a5586 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 27 Sep 2021 09:46:38 +0200 Subject: [PATCH 32/34] telling jitpack to use jdk 11 --- jitpack.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 jitpack.yml diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 000000000..adb3fe10c --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +jdk: + - openjdk11 From 98ff7bb1408ed74a7841c9b960e34e230a4e1578 Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 27 Sep 2021 09:49:58 +0200 Subject: [PATCH 33/34] removing the not needed maven plugin too --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index b31aa712d..1b25428cb 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,6 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.0.2' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong From a74ec200dac17e578c57ae14df87f715112208da Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 27 Sep 2021 10:04:44 +0200 Subject: [PATCH 34/34] adding more maven related things related to gradle 7 --- build.gradle | 1 + commons/build.gradle | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/build.gradle b/build.gradle index 1b25428cb..b31aa712d 100644 --- a/build.gradle +++ b/build.gradle @@ -17,6 +17,7 @@ buildscript { dependencies { classpath 'com.android.tools.build:gradle:7.0.2' + classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong diff --git a/commons/build.gradle b/commons/build.gradle index 11a873097..117322c54 100644 --- a/commons/build.gradle +++ b/commons/build.gradle @@ -2,6 +2,7 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' +apply plugin: 'maven-publish' android { compileSdkVersion propCompileSdkVersion @@ -45,3 +46,13 @@ dependencies { kapt 'com.github.bumptech.glide:compiler:4.10.0' annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0' } + +project.afterEvaluate { + publishing { + publications { + release(MavenPublication) { + from components.release + } + } + } +}