Skip to content

Commit 361d325

Browse files
authored
Merge pull request #308 from chillibits/dev
Release of version 2.8.1
2 parents 5a3eb6a + ecfc671 commit 361d325

File tree

117 files changed

+670
-367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+670
-367
lines changed

.github/dependabot.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
version: 2
22
updates:
3-
- package-ecosystem: gradle
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
time: "04:00"
8-
timezone: Europe/Berlin
9-
open-pull-requests-limit: 15
10-
target-branch: dev
11-
reviewers:
12-
- marcauberer
13-
assignees:
14-
- marcauberer
3+
- package-ecosystem: gradle
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "04:00"
8+
timezone: Europe/Berlin
9+
open-pull-requests-limit: 15
10+
target-branch: dev
11+
reviewers:
12+
- chillibits/android-core-development
13+
assignees:
14+
- marcauberer

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ Thanks to following people:
4444

4545
Thanks to all contributors and translators!
4646

47-
© ChilliBits 2017-2022 (Designed and developed by Marc Auberer)
47+
© ChilliBits 2017-2023 (Designed and developed by Marc Auberer)

app/build.gradle

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
plugins {
@@ -17,8 +17,8 @@ android {
1717
applicationId "com.mrgames13.jimdo.colorconverter"
1818
minSdkVersion 21
1919
targetSdkVersion 33
20-
versionCode 2800
21-
versionName "2.8.0"
20+
versionCode 2801
21+
versionName "2.8.1"
2222
vectorDrawables.useSupportLibrary = true
2323
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
2424
}
@@ -49,16 +49,17 @@ android {
4949

5050
dependencies {
5151
// base dependencies
52-
implementation 'androidx.appcompat:appcompat:1.5.1'
52+
implementation 'androidx.appcompat:appcompat:1.6.1'
5353
implementation 'androidx.core:core-ktx:1.9.0'
5454
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
5555
implementation 'com.google.android.instantapps:instantapps:1.1.0'
5656
implementation 'com.google.android.play:core:1.10.3'
5757
implementation 'androidx.palette:palette-ktx:1.0.0'
58-
implementation 'androidx.exifinterface:exifinterface:1.3.5'
59-
implementation 'com.google.android.material:material:1.7.0'
60-
implementation 'androidx.fragment:fragment-ktx:1.5.5'
61-
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
58+
implementation 'androidx.exifinterface:exifinterface:1.3.6'
59+
implementation 'com.google.android.material:material:1.8.0'
60+
implementation 'androidx.fragment:fragment-ktx:1.5.6'
61+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1'
62+
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.6.1"
6263
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
6364

6465
// External dependencies
@@ -85,17 +86,17 @@ dependencies {
8586

8687
// dependencies for testing
8788
testImplementation 'junit:junit:4.13.2'
88-
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
89-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
89+
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
90+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
9091
}
9192

9293
// Task for downloading all translation files
9394
task downloadTranslations {
9495
group 'pre-build tasks'
9596
description 'Downloads all translation files when building the app.'
9697

97-
ext.apiKey = 'IEKWn_DI-otivDlUWAN-NvNIT3bBWO_h'
98-
ext.apiKeyColors = 'ReBhdq025DTUFKoKIvmvLLyY6hznXyCg'
98+
ext.apiKey = 'cUnfQzJMGOihCQd0fvd4-c4FgYefuTB4'
99+
ext.apiKeyColors = 'yHOCAB47RYyEPn9Ac_HbFp0aYMHszSwZ'
99100

100101
// English
101102
doLast {

app/src/androidTest/java/com/chillibits/colorconverter/ExampleInstrumentedTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!--
3-
~ Copyright © Marc Auberer 2017-2022. All rights reserved
3+
~ Copyright © Marc Auberer 2017-2023. All rights reserved
44
-->
55

66
<manifest
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter
@@ -8,4 +8,4 @@ import android.app.Application
88
import dagger.hilt.android.HiltAndroidApp
99

1010
@HiltAndroidApp
11-
class ColorConverterApplication: Application()
11+
class ColorConverterApplication : Application()
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.model
@@ -8,22 +8,29 @@ import androidx.core.graphics.alpha
88
import androidx.core.graphics.blue
99
import androidx.core.graphics.green
1010
import androidx.core.graphics.red
11-
import org.jetbrains.annotations.NotNull
1211

1312
class Color(
1413
var id: Int,
1514
var name: String,
1615
var color: Int,
1716
var creationTimestamp: Long = System.currentTimeMillis()
18-
): Comparable<Color> {
17+
) : Comparable<Color> {
1918

2019
var alpha = color.alpha
2120
var red = color.red
2221
var green = color.green
2322
var blue = color.blue
2423

25-
constructor(id: Int, name: String, alpha: Int, red: Int, green: Int, blue: Int, creationTimestamp: Long):
24+
constructor(
25+
id: Int,
26+
name: String,
27+
alpha: Int,
28+
red: Int,
29+
green: Int,
30+
blue: Int,
31+
creationTimestamp: Long
32+
) :
2633
this(id, name, android.graphics.Color.argb(alpha, red, green, blue), creationTimestamp)
2734

28-
override fun compareTo(@NotNull other: Color) = other.creationTimestamp.compareTo(creationTimestamp)
35+
override fun compareTo(other: Color) = other.creationTimestamp.compareTo(creationTimestamp)
2936
}

app/src/main/java/com/chillibits/colorconverter/model/ColorName.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.model

app/src/main/java/com/chillibits/colorconverter/repository/ColorRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.repository

app/src/main/java/com/chillibits/colorconverter/shared/Constants.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.shared
@@ -17,7 +17,6 @@ object Constants {
1717
const val EXTRA_CHOOSE_COLOR = "ChooseColor"
1818
const val EXTRA_IMAGE_URI = "ImageUri"
1919
const val EXTRA_COLOR = "Color"
20-
const val EXTRA_SELECTED_COLOR = "SelectedColor"
2120

2221
// Shared Preferences keys
2322
const val ARGB_REMEMBER = "ArgbRemember"
@@ -32,5 +31,4 @@ object Constants {
3231
const val COLOR_ANIMATION_DURATION = 500L
3332
const val NAME_SELECTED_COLOR = "Selection"
3433
const val HSV_FORMAT_STRING = "%.02f"
35-
const val SHARED_PREFERENCES_NAME = "com.mrgames13.jimdo.colorconverter_preferences"
3634
}

app/src/main/java/com/chillibits/colorconverter/shared/Extensions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.shared

app/src/main/java/com/chillibits/colorconverter/shared/HiltInstanceProviders.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.shared

app/src/main/java/com/chillibits/colorconverter/shared/SimpleOnSeekBarChangeListener.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.shared

app/src/main/java/com/chillibits/colorconverter/storage/AppDatabase.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.storage
@@ -11,6 +11,6 @@ import com.chillibits.colorconverter.storage.dbo.ColorDbo
1111

1212
// Increase version whenever the structure of the local db changes
1313
@Database(entities = [ColorDbo::class], exportSchema = false, version = 3)
14-
abstract class AppDatabase: RoomDatabase() {
14+
abstract class AppDatabase : RoomDatabase() {
1515
abstract fun colorDao(): ColorDao
1616
}

app/src/main/java/com/chillibits/colorconverter/storage/DatabaseMigrations.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.storage
@@ -8,7 +8,7 @@ import androidx.room.migration.Migration
88
import androidx.sqlite.db.SupportSQLiteDatabase
99

1010
// Migration from SQLite API to Room
11-
val MIGRATION_2_3 = object: Migration(2, 3) {
11+
val MIGRATION_2_3 = object : Migration(2, 3) {
1212
override fun migrate(database: SupportSQLiteDatabase) {
1313
database.execSQL("ALTER TABLE Colors RENAME TO tmp;")
1414
database.execSQL("CREATE TABLE colors (id INTEGER PRIMARY KEY NOT NULL, name TEXT NOT NULL, red INTEGER NOT NULL, green INTEGER NOT NULL, blue INTEGER NOT NULL, creation_timestamp INTEGER NOT NULL, alpha INTEGER NOT NULL);")

app/src/main/java/com/chillibits/colorconverter/storage/dao/ColorDao.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.storage.dao
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.storage.dbo
@@ -10,12 +10,12 @@ import androidx.room.PrimaryKey
1010

1111
@Entity(tableName = "colors")
1212
data class ColorDbo(
13-
@PrimaryKey(autoGenerate = true)
14-
@ColumnInfo(name = "id") val id: Int,
15-
@ColumnInfo(name = "name") var name: String,
16-
@ColumnInfo(name = "alpha") val alpha: Int,
17-
@ColumnInfo(name = "red") val red: Int,
18-
@ColumnInfo(name = "green") val green: Int,
19-
@ColumnInfo(name = "blue") val blue: Int,
20-
@ColumnInfo(name = "creation_timestamp") val creationTimestamp: Long
13+
@PrimaryKey(autoGenerate = true)
14+
@ColumnInfo(name = "id") val id: Int,
15+
@ColumnInfo(name = "name") var name: String,
16+
@ColumnInfo(name = "alpha") val alpha: Int,
17+
@ColumnInfo(name = "red") val red: Int,
18+
@ColumnInfo(name = "green") val green: Int,
19+
@ColumnInfo(name = "blue") val blue: Int,
20+
@ColumnInfo(name = "creation_timestamp") val creationTimestamp: Long
2121
)

app/src/main/java/com/chillibits/colorconverter/tools/ClipboardTools.kt

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.tools
@@ -21,7 +21,8 @@ class ClipboardTools(
2121
private val ct: ColorTools
2222
) {
2323

24-
fun copyNameToClipboard(name: String) = context.copyTextToClipboard(context.getString(R.string.name), name)
24+
fun copyNameToClipboard(name: String) =
25+
context.copyTextToClipboard(context.getString(R.string.name), name)
2526

2627
fun copyArgbToClipboard(color: Color) = context.run {
2728
if (getPrefBooleanValue(Constants.ENABLE_ALPHA, true)) {
@@ -30,22 +31,25 @@ class ClipboardTools(
3031
showArgbExportDialog(st, color.alpha, color.red, color.green, color.blue)
3132
} else if (getPrefBooleanValue(Constants.ARGB_REMEMBER_SELECTION, false)) {
3233
copyTextToClipboard(
33-
getString(R.string.argb_code), String.format(
34+
getString(R.string.argb_code), String.format(
3435
getString(R.string.argb_clipboard),
35-
color.alpha, color.red, color.green, color.blue)
36+
color.alpha, color.red, color.green, color.blue
37+
)
3638
)
3739
} else {
3840
copyTextToClipboard(
39-
getString(R.string.argb_code), String.format(
41+
getString(R.string.argb_code), String.format(
4042
getString(R.string.rgba_clipboard_css),
41-
color.red, color.green, color.blue, (color.alpha / 255.0).round(3))
43+
color.red, color.green, color.blue, (color.alpha / 255.0).round(3)
44+
)
4245
)
4346
}
4447
} else {
4548
copyTextToClipboard(
46-
getString(R.string.rgb_code), String.format(
49+
getString(R.string.rgb_code), String.format(
4750
getString(R.string.rgb_clipboard),
48-
color.red, color.green, color.blue)
51+
color.red, color.green, color.blue
52+
)
4953
)
5054
}
5155
}
@@ -63,10 +67,12 @@ class ClipboardTools(
6367
fun copyHsvToClipboard(color: Color) = context.run {
6468
val hsv = FloatArray(3)
6569
android.graphics.Color.RGBToHSV(color.red, color.green, color.blue, hsv)
66-
val hsvString = String.format(getString(R.string.hsv_),
70+
val hsvString = String.format(
71+
getString(R.string.hsv_),
6772
String.format(Constants.HSV_FORMAT_STRING, hsv[0]),
6873
String.format(Constants.HSV_FORMAT_STRING, hsv[1]),
69-
String.format(Constants.HSV_FORMAT_STRING, hsv[2]))
74+
String.format(Constants.HSV_FORMAT_STRING, hsv[2])
75+
)
7076
copyTextToClipboard(getString(R.string.hsv_clipboard), hsvString)
7177
}
7278

app/src/main/java/com/chillibits/colorconverter/tools/ColorNameTools.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © Marc Auberer 2017-2022. All rights reserved
2+
* Copyright © Marc Auberer 2017-2023. All rights reserved
33
*/
44

55
package com.chillibits.colorconverter.tools
@@ -169,5 +169,6 @@ class ColorNameTools(private val c: Context) {
169169
return closestMatch?.name ?: "No color"
170170
}
171171

172-
fun getColorNameFromColor(color: Color) = getColorNameFromRgb(color.red, color.green, color.blue)
172+
fun getColorNameFromColor(color: Color) =
173+
getColorNameFromRgb(color.red, color.green, color.blue)
173174
}

0 commit comments

Comments
 (0)