diff --git a/.idea/misc.xml b/.idea/misc.xml
index 707ee6e6..2dc54c48 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 1e34644b..1d474fd3 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -7,14 +7,14 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
- compileSdkVersion 29
- buildToolsVersion "29.0.3"
+ compileSdkVersion 30
+ buildToolsVersion "30.0.1"
defaultConfig {
applicationId "com.mrgames13.jimdo.colorconverter"
minSdkVersion 21
- targetSdkVersion 29
- versionCode 2300
- versionName "2.3.0"
+ targetSdkVersion 30
+ versionCode 2301
+ versionName "2.3.1"
vectorDrawables.useSupportLibrary = true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
@@ -38,11 +38,11 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.3.0-alpha01'
implementation 'androidx.core:core-ktx:1.5.0-alpha01'
- implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta7'
+ implementation 'androidx.constraintlayout:constraintlayout:2.0.0-rc1'
implementation 'com.google.android.instantapps:instantapps:1.1.0'
- implementation 'com.google.android.play:core:1.7.3'
+ implementation 'com.google.android.play:core:1.8.0'
implementation 'androidx.palette:palette-ktx:1.0.0'
- implementation 'com.google.android.material:material:1.3.0-alpha01'
+ implementation 'com.google.android.material:material:1.3.0-alpha02'
// External dependencies
implementation 'net.margaritov.preference.colorpicker.ColorPickerPreference:ColorPickerPreference:1.0.0'
@@ -51,13 +51,13 @@ dependencies {
implementation 'com.github.skydoves:colorpickerview:2.1.6'
implementation 'com.mikepenz:iconics-core:5.0.3'
implementation 'com.mikepenz:material-design-iconic-typeface:2.2.0.6-kotlin@aar'
- implementation 'com.mikepenz:fastadapter:5.1.0'
- implementation 'com.github.javiersantos:MaterialStyledDialogs:3.0.1'
+ implementation 'com.mikepenz:fastadapter:5.2.2'
+ implementation 'com.github.javiersantos:MaterialStyledDialogs:3.0.2'
// dependencies for testing
testImplementation 'junit:junit:4.13'
- androidTestImplementation 'androidx.test.ext:junit:1.1.2-rc01'
- androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-rc01'
+ androidTestImplementation 'androidx.test.ext:junit:1.1.2-rc02'
+ androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-rc02'
}
// Task for downloading all translation files
@@ -109,7 +109,7 @@ task downloadTranslations {
// Main string file
def f = new File("${project.projectDir}/src/main/res/values-ru/strings.xml")
new URL("https://localise.biz/api/export/locale/ru.xml?format=android&key=${apiKey}").withInputStream{ i -> f.withOutputStream{ it << i }}
- // Color file (not translated to Russian yet)
+ // Color file (will be added again, when the translation is complete)
//f = new File("${project.projectDir}/src/main/res/values-ru/strings_colors.xml")
//new URL("https://localise.biz/api/export/locale/ru.xml?format=android&key=${apiKeyColors}").withInputStream{ i -> f.withOutputStream{ it << i }}
}
diff --git a/app/src/main/java/com/chillibits/colorconverter/ui/activity/ColorSelectionActivity.kt b/app/src/main/java/com/chillibits/colorconverter/ui/activity/ColorSelectionActivity.kt
index 01929030..4d9eca21 100644
--- a/app/src/main/java/com/chillibits/colorconverter/ui/activity/ColorSelectionActivity.kt
+++ b/app/src/main/java/com/chillibits/colorconverter/ui/activity/ColorSelectionActivity.kt
@@ -39,16 +39,20 @@ class ColorSelectionActivity : AppCompatActivity() {
setContentView(R.layout.activity_color_selection)
window.run {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
- decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
- decorView.setOnApplyWindowInsetsListener { _, insets ->
- toolbar?.setPadding(0, insets.systemWindowInsetTop, 0, 0)
- savedColors.setPadding(0, 0, 0, insets.systemWindowInsetBottom)
- insets
+ when {
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -> setDecorFitsSystemWindows(false)
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q -> {
+ decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
+ decorView.setOnApplyWindowInsetsListener { _, insets ->
+ toolbar?.setPadding(0, insets.systemWindowInsetTop, 0, 0)
+ savedColors.setPadding(0, 0, 0, insets.systemWindowInsetBottom)
+ insets
+ }
+ }
+ else -> {
+ addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
+ statusBarColor = ContextCompat.getColor(context, R.color.colorPrimaryDark)
}
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
- statusBarColor = ContextCompat.getColor(context, R.color.colorPrimaryDark)
}
}
@@ -137,19 +141,14 @@ class ColorSelectionActivity : AppCompatActivity() {
}
private fun animateAppAndStatusBar(toColor: Int) {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- val animator = ViewAnimationUtils.createCircularReveal(reveal, toolbar.width / 2, toolbar.height / 2, 0f, toolbar.width / 2.0f + 50)
- animator.addListener(object : AnimatorListenerAdapter() {
- override fun onAnimationStart(animation: Animator) { reveal.setBackgroundColor(toColor) }
- override fun onAnimationEnd(animation: Animator) { revealBackground.setBackgroundColor(toColor) }
- })
-
- animator.duration = 480
- animator.start()
- reveal.visibility = View.VISIBLE
- } else {
- reveal.setBackgroundColor(toColor)
- revealBackground.setBackgroundColor(toColor)
- }
+ val animator = ViewAnimationUtils.createCircularReveal(reveal, toolbar.width / 2, toolbar.height / 2, 0f, toolbar.width / 2.0f + 50)
+ animator.addListener(object : AnimatorListenerAdapter() {
+ override fun onAnimationStart(animation: Animator) { reveal.setBackgroundColor(toColor) }
+ override fun onAnimationEnd(animation: Animator) { revealBackground.setBackgroundColor(toColor) }
+ })
+
+ animator.duration = 480
+ animator.start()
+ reveal.visibility = View.VISIBLE
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/chillibits/colorconverter/ui/activity/ImageActivity.kt b/app/src/main/java/com/chillibits/colorconverter/ui/activity/ImageActivity.kt
index edf331b9..1100bf07 100644
--- a/app/src/main/java/com/chillibits/colorconverter/ui/activity/ImageActivity.kt
+++ b/app/src/main/java/com/chillibits/colorconverter/ui/activity/ImageActivity.kt
@@ -68,19 +68,7 @@ class ImageActivity : AppCompatActivity() {
setContentView(R.layout.activity_image)
// Apply window insets
- window.run {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
- decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
- decorView.setOnApplyWindowInsetsListener { _, insets ->
- toolbar?.setPadding(0, insets.systemWindowInsetTop, 0, 0)
- colorButtonContainer.setPadding(dpToPx(3), dpToPx(3), dpToPx(3), insets.systemWindowInsetBottom + dpToPx(3))
- insets
- }
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
- statusBarColor = ContextCompat.getColor(context, R.color.colorPrimaryDark)
- }
- }
+ applyWindowInsets()
// Initialize toolbar
setSupportActionBar(toolbar)
@@ -116,7 +104,7 @@ class ImageActivity : AppCompatActivity() {
if(intent.hasExtra(Constants.EXTRA_IMAGE_URI)) {
// Load default image
- val defaultImageUri = intent.getParcelableExtra(Constants.EXTRA_IMAGE_URI) as Uri
+ val defaultImageUri = intent.getParcelableExtra(Constants.EXTRA_IMAGE_URI)
val bitmap = MediaStore.Images.Media.getBitmap(contentResolver, defaultImageUri)
applyImage(bitmap)
} else if(savedInstanceState == null) {
@@ -170,6 +158,27 @@ class ImageActivity : AppCompatActivity() {
}
}
+ private fun applyWindowInsets() {
+ window.run {
+ when {
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -> setDecorFitsSystemWindows(false)
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q -> {
+ decorView.systemUiVisibility =
+ View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
+ decorView.setOnApplyWindowInsetsListener { _, insets ->
+ toolbar?.setPadding(0, insets.systemWindowInsetTop, 0, 0)
+ colorButtonContainer.setPadding(dpToPx(3), dpToPx(3), dpToPx(3), insets.systemWindowInsetBottom + dpToPx(3))
+ insets
+ }
+ }
+ else -> {
+ addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
+ statusBarColor = ContextCompat.getColor(context, R.color.colorPrimaryDark)
+ }
+ }
+ }
+ }
+
private fun applyRotation(source: Bitmap, path: String) = when (ExifInterface(path).getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_UNDEFINED)) {
ExifInterface.ORIENTATION_ROTATE_90 -> rotateImage(source, 90F)
ExifInterface.ORIENTATION_ROTATE_180 -> rotateImage(source, 180F)
@@ -218,11 +227,7 @@ class ImageActivity : AppCompatActivity() {
} else {
if(initialized) {
val colorName = cnt.getColorNameFromColor(com.chillibits.colorconverter.model.Color(0, "", valueSelectedColor, 0))
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- tts.speak(colorName, TextToSpeech.QUEUE_FLUSH, null, null)
- } else {
- tts.speak(colorName, TextToSpeech.QUEUE_FLUSH, null)
- }
+ tts.speak(colorName, TextToSpeech.QUEUE_FLUSH, null, null)
} else {
Toast.makeText(this, R.string.initialization_failed, Toast.LENGTH_SHORT).show()
}
diff --git a/app/src/main/java/com/chillibits/colorconverter/ui/activity/MainActivity.kt b/app/src/main/java/com/chillibits/colorconverter/ui/activity/MainActivity.kt
index 4d646851..c2a608ea 100644
--- a/app/src/main/java/com/chillibits/colorconverter/ui/activity/MainActivity.kt
+++ b/app/src/main/java/com/chillibits/colorconverter/ui/activity/MainActivity.kt
@@ -61,20 +61,7 @@ class MainActivity : AppCompatActivity() {
setContentView(R.layout.activity_main)
// Apply window insets
- window.run {
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
- decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
- decorView.setOnApplyWindowInsetsListener { _, insets ->
- toolbar?.setPadding(0, insets.systemWindowInsetTop, 0, 0)
- scrollContainer.setPadding(0, 0, 0, insets.systemWindowInsetBottom)
- finishWithColorWrapper.setPadding(0, 0, 0, insets.systemWindowInsetBottom)
- insets
- }
- } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
- statusBarColor = ContextCompat.getColor(context, R.color.colorPrimaryDark)
- }
- }
+ applyWindowInsets()
// Initialize toolbar
setSupportActionBar(toolbar)
@@ -119,7 +106,10 @@ class MainActivity : AppCompatActivity() {
override fun onCreateOptionsMenu(menu: Menu?): Boolean {
menuInflater.inflate(R.menu.menu_activity_main, menu)
if (InstantApps.isInstantApp(this)) menu?.findItem(R.id.action_install)?.isVisible = true
- if (intent.hasExtra(Constants.EXTRA_CHOOSE_COLOR)) menu?.findItem(R.id.action_done)?.isVisible = true
+ if (intent.hasExtra(Constants.EXTRA_CHOOSE_COLOR)) {
+ menu?.findItem(R.id.action_done)?.isVisible = true
+ menu?.findItem(R.id.action_disable_alpha)?.isVisible = false
+ }
menu?.findItem(R.id.action_transparency)?.isVisible = showTransparencyWarning
disableAlpha = menu?.findItem(R.id.action_disable_alpha)
disableAlpha?.isChecked = isAlphaDisabled
@@ -177,6 +167,28 @@ class MainActivity : AppCompatActivity() {
}
}
+ private fun applyWindowInsets() {
+ window.run {
+ when {
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.R -> setDecorFitsSystemWindows(false)
+ Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q -> {
+ decorView.systemUiVisibility =
+ View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION or View.SYSTEM_UI_FLAG_LAYOUT_STABLE or View.SYSTEM_UI_FLAG_LIGHT_NAVIGATION_BAR
+ decorView.setOnApplyWindowInsetsListener { _, insets ->
+ toolbar?.setPadding(0, insets.systemWindowInsetTop, 0, 0)
+ scrollContainer.setPadding(0, 0, 0, insets.systemWindowInsetBottom)
+ finishWithColorWrapper.setPadding(0, 0, 0, insets.systemWindowInsetBottom)
+ insets
+ }
+ }
+ else -> {
+ addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
+ statusBarColor = ContextCompat.getColor(context, R.color.colorPrimaryDark)
+ }
+ }
+ }
+ }
+
private fun pickColorFromImage(defaultImageUri: Uri? = null) {
if (InstantApps.isInstantApp(this@MainActivity)) {
showInstantAppInstallDialog(R.string.instant_install_m)
@@ -226,7 +238,10 @@ class MainActivity : AppCompatActivity() {
// Initialize views
val dialogView = LayoutInflater.from(this).inflate(R.layout.dialog_edit_hex, container, false)
val hexValue = dialogView.dialogHex
- hexValue.setText(String.format(getString(R.string.hex_format), "%08X".format(selectedColor.color).toUpperCase()))
+ if(isAlphaDisabled)
+ hexValue.setText(String.format(getString(R.string.hex_format, "%06X".format((0xFFFFFF and selectedColor.color)).toUpperCase(Locale.getDefault()))))
+ else
+ hexValue.setText(String.format(getString(R.string.hex_format), "%08X".format(selectedColor.color).toUpperCase(Locale.getDefault())))
Selection.setSelection(hexValue.text, hexValue.text.length)
// Create dialog
@@ -236,7 +251,8 @@ class MainActivity : AppCompatActivity() {
.setNegativeButton(R.string.cancel, null)
.setPositiveButton(R.string.choose_color) { _, _ ->
var hex = hexValue.text.toString()
- if(hex.length == 5) hex = hex.replace(Regex("#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])"), "#$1$1$2$2$3$3$4$4")
+ if(isAlphaDisabled && hex.length == 4) hex = hex.replace(Regex("#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])"), "#$1$1$2$2$3$3")
+ if(!isAlphaDisabled && hex.length == 5) hex = hex.replace(Regex("#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])"), "#$1$1$2$2$3$3$4$4")
val tmp = selectedColor
tmp.color = android.graphics.Color.parseColor(hex)
tmp.alpha = tmp.color.alpha
@@ -255,10 +271,14 @@ class MainActivity : AppCompatActivity() {
Selection.setSelection(hexValue.text, hexValue.text.length)
} else {
if(value.length > 1 && !value.matches("#[a-fA-F0-9]+".toRegex())) s?.delete(value.length -1, value.length)
- dialog.getButton(AlertDialog.BUTTON_POSITIVE).isEnabled = s.toString().length == 9 || s.toString().length == 5
+ dialog.getButton(AlertDialog.BUTTON_POSITIVE).isEnabled = if(isAlphaDisabled) {
+ s.toString().length == 7 || s.toString().length == 4
+ } else {
+ s.toString().length == 9 || s.toString().length == 5
+ }
}
}
- hexValue.setSelection(1, 9)
+ hexValue.setSelection(1, if(isAlphaDisabled) 7 else 9)
hexValue.requestFocus()
dialog.window?.clearFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE or WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM)
dialog.window?.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE)
@@ -341,9 +361,9 @@ class MainActivity : AppCompatActivity() {
}
// Update HEX TextView
displayHex.text = if(isAlphaDisabled) {
- String.format(getString(R.string.hex_), "%06X".format((0xFFFFFF and color.color)).toUpperCase())
+ String.format(getString(R.string.hex_), "%06X".format((0xFFFFFF and color.color)).toUpperCase(Locale.getDefault()))
} else {
- String.format(getString(R.string.hex_), "%08X".format(color.color).toUpperCase())
+ String.format(getString(R.string.hex_), "%08X".format(color.color).toUpperCase(Locale.getDefault()))
}
// Update HSV TextView
val hsv = FloatArray(3)
@@ -361,13 +381,14 @@ class MainActivity : AppCompatActivity() {
displayHex.setTextColor(textColor)
displayHsv.setTextColor(textColor)
displayCmyk.setTextColor(textColor)
- copyName.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(textColor, BlendModeCompat.SRC_ATOP)
- copyArgb.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(textColor, BlendModeCompat.SRC_ATOP)
- copyHex.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(textColor, BlendModeCompat.SRC_ATOP)
- copyHsv.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(textColor, BlendModeCompat.SRC_ATOP)
- copyCmyk.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(textColor, BlendModeCompat.SRC_ATOP)
- saveColor.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(textColor, BlendModeCompat.SRC_ATOP)
- loadColor.colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(textColor, BlendModeCompat.SRC_ATOP)
+ val colorFilter = BlendModeColorFilterCompat.createBlendModeColorFilterCompat(textColor, BlendModeCompat.SRC_ATOP)
+ copyName.colorFilter = colorFilter
+ copyArgb.colorFilter = colorFilter
+ copyHex.colorFilter = colorFilter
+ copyHsv.colorFilter = colorFilter
+ copyCmyk.colorFilter = colorFilter
+ saveColor.colorFilter = colorFilter
+ loadColor.colorFilter = colorFilter
// Update animated views
ValueAnimator.ofInt(colorAlpha.progress, color.alpha).apply {
@@ -402,11 +423,7 @@ class MainActivity : AppCompatActivity() {
} else {
if(initialized) {
val colorName = cnt.getColorNameFromColor(selectedColor)
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- tts.speak(colorName, TextToSpeech.QUEUE_FLUSH, null, null)
- } else {
- tts.speak(colorName, TextToSpeech.QUEUE_FLUSH, null)
- }
+ tts.speak(colorName, TextToSpeech.QUEUE_FLUSH, null, null)
} else {
Toast.makeText(this, R.string.initialization_failed, Toast.LENGTH_SHORT).show()
}
@@ -435,7 +452,8 @@ class MainActivity : AppCompatActivity() {
selectedColor.green,
selectedColor.blue
)
- displayHex.text = String.format(getString(R.string.hex_), "%08X".format(selectedColor.color).toUpperCase())
+ displayHex.text = String.format(getString(R.string.hex_), "%08X".format(selectedColor.color).toUpperCase(
+ Locale.getDefault()))
val hsv = FloatArray(3)
android.graphics.Color.RGBToHSV(
selectedColor.red,
@@ -543,13 +561,13 @@ class MainActivity : AppCompatActivity() {
copyTextToClipboard(
getString(R.string.hex_code),
if (isAlphaDisabled)
- "#%06X".format(0xFFFFFF and selectedColor.color).toUpperCase()
+ "#%06X".format(0xFFFFFF and selectedColor.color).toUpperCase(Locale.getDefault())
else
- "#%08X".format(selectedColor.color).toUpperCase()
+ "#%08X".format(selectedColor.color).toUpperCase(Locale.getDefault())
)
}
- private fun copyHsvToClipboard() = copyTextToClipboard(getString(R.string.hsv_code), displayHsv.text.toString())
+ private fun copyHsvToClipboard() = copyTextToClipboard(getString(R.string.hsv_clipboard), displayHsv.text.toString())
private fun copyCmykToClipboard() {
// Show multiple choice dialog
diff --git a/app/src/main/java/com/chillibits/colorconverter/ui/adapter/ColorsAdapter.kt b/app/src/main/java/com/chillibits/colorconverter/ui/adapter/ColorsAdapter.kt
index efa1e9ca..0c50db51 100644
--- a/app/src/main/java/com/chillibits/colorconverter/ui/adapter/ColorsAdapter.kt
+++ b/app/src/main/java/com/chillibits/colorconverter/ui/adapter/ColorsAdapter.kt
@@ -16,6 +16,7 @@ import com.chillibits.colorconverter.tools.setTint
import com.chillibits.colorconverter.ui.activity.ColorSelectionActivity
import com.mrgames13.jimdo.colorconverter.R
import kotlinx.android.synthetic.main.item_color.view.*
+import java.util.*
class ColorsAdapter(
private val activity: ColorSelectionActivity,
@@ -48,7 +49,7 @@ class ColorsAdapter(
String.format(
activity.getString(R.string.color_summary_alpha_disabled),
color.red, color.green, color.blue,
- "%06X".format(0xFFFFFF and color.color).toUpperCase(),
+ "%06X".format(0xFFFFFF and color.color).toUpperCase(Locale.getDefault()),
String.format(Constants.HSV_FORMAT_STRING, hsv[0]),
String.format(Constants.HSV_FORMAT_STRING, hsv[1]),
String.format(Constants.HSV_FORMAT_STRING, hsv[2]),
@@ -58,7 +59,7 @@ class ColorsAdapter(
String.format(
activity.getString(R.string.color_summary),
color.alpha, color.red, color.green, color.blue,
- "%08X".format(color.color).toUpperCase(),
+ "%08X".format(color.color).toUpperCase(Locale.getDefault()),
String.format(Constants.HSV_FORMAT_STRING, hsv[0]),
String.format(Constants.HSV_FORMAT_STRING, hsv[1]),
String.format(Constants.HSV_FORMAT_STRING, hsv[2]),
diff --git a/app/src/main/java/com/chillibits/colorconverter/viewmodel/DetailedFlagView.kt b/app/src/main/java/com/chillibits/colorconverter/viewmodel/DetailedFlagView.kt
index f7ca4826..9dfcdb70 100644
--- a/app/src/main/java/com/chillibits/colorconverter/viewmodel/DetailedFlagView.kt
+++ b/app/src/main/java/com/chillibits/colorconverter/viewmodel/DetailedFlagView.kt
@@ -13,6 +13,7 @@ import com.mrgames13.jimdo.colorconverter.R
import com.skydoves.colorpickerview.ColorEnvelope
import com.skydoves.colorpickerview.flag.FlagView
import kotlinx.android.synthetic.main.flag_layout.view.*
+import java.util.*
@SuppressLint("ViewConstructor")
class DetailedFlagView(context: Context, layout: Int) : FlagView(context, layout) {
@@ -28,9 +29,9 @@ class DetailedFlagView(context: Context, layout: Int) : FlagView(context, layout
String.format(context.getString(R.string.argb_), envelope.color.alpha, envelope.color.red, envelope.color.green, envelope.color.blue)
}
flagColorHex.text = if(isAlphaDisabled)
- String.format(context.getString(R.string.hex_), "%06X".format(0xFFFFFF and envelope.color).toUpperCase())
+ String.format(context.getString(R.string.hex_), "%06X".format(0xFFFFFF and envelope.color).toUpperCase(Locale.getDefault()))
else
- String.format(context.getString(R.string.hex_), "%08X".format(envelope.color).toUpperCase())
+ String.format(context.getString(R.string.hex_), "%08X".format(envelope.color).toUpperCase(Locale.getDefault()))
val hsv = FloatArray(3)
android.graphics.Color.RGBToHSV(envelope.color.red, envelope.color.green, envelope.color.blue, hsv)
flagColorHsv.text = String.format(context.getString(R.string.hsv_), String.format(Constants.HSV_FORMAT_STRING, hsv[0]), String.format(Constants.HSV_FORMAT_STRING, hsv[1]), String.format(Constants.HSV_FORMAT_STRING, hsv[2]))
diff --git a/app/src/main/res/drawable-night/splash.xml b/app/src/main/res/drawable-night/splash.xml
index da5ecc6c..ebd39376 100644
--- a/app/src/main/res/drawable-night/splash.xml
+++ b/app/src/main/res/drawable-night/splash.xml
@@ -5,5 +5,5 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable-v21/button_outline.xml b/app/src/main/res/drawable-v21/button_outline.xml
deleted file mode 100644
index 8c92d1d0..00000000
--- a/app/src/main/res/drawable-v21/button_outline.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable-v21/button_outline_rounded.xml b/app/src/main/res/drawable-v21/button_outline_rounded.xml
deleted file mode 100644
index 654adf3b..00000000
--- a/app/src/main/res/drawable-v21/button_outline_rounded.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/drawable/button_outline.xml b/app/src/main/res/drawable/button_outline.xml
index e798dcfb..8c92d1d0 100644
--- a/app/src/main/res/drawable/button_outline.xml
+++ b/app/src/main/res/drawable/button_outline.xml
@@ -3,24 +3,28 @@
~ Copyright © Marc Auberer 2020. All rights reserved
-->
-
- -
+
+
-
+
-
- -
-
-
-
-
-
-
- -
-
-
-
-
+
+
-
+
+
-
+
+
+
+
+
+ -
+
+
+
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/button_outline_rounded.xml b/app/src/main/res/drawable/button_outline_rounded.xml
index ba93f4b1..654adf3b 100644
--- a/app/src/main/res/drawable/button_outline_rounded.xml
+++ b/app/src/main/res/drawable/button_outline_rounded.xml
@@ -3,24 +3,28 @@
~ Copyright © Marc Auberer 2020. All rights reserved
-->
-
- -
+
+
-
+
-
- -
-
-
-
-
-
-
- -
-
-
-
-
+
+
-
+
+
-
+
+
+
+
+
+ -
+
+
+
+
+
+
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/css_logo.xml b/app/src/main/res/drawable/css_logo.xml
index c7fefae8..645765c9 100644
--- a/app/src/main/res/drawable/css_logo.xml
+++ b/app/src/main/res/drawable/css_logo.xml
@@ -2,7 +2,7 @@
~ Copyright © Marc Auberer 2020. All rights reserved
-->
-
diff --git a/app/src/main/res/drawable/flag.9.png b/app/src/main/res/drawable/flag.9.png
new file mode 100644
index 00000000..380521d8
Binary files /dev/null and b/app/src/main/res/drawable/flag.9.png differ
diff --git a/app/src/main/res/drawable/flag.png b/app/src/main/res/drawable/flag.png
deleted file mode 100644
index f51c1dc4..00000000
Binary files a/app/src/main/res/drawable/flag.png and /dev/null differ
diff --git a/app/src/main/res/drawable/splash.xml b/app/src/main/res/drawable/splash.xml
index da5ecc6c..ebd39376 100644
--- a/app/src/main/res/drawable/splash.xml
+++ b/app/src/main/res/drawable/splash.xml
@@ -5,5 +5,5 @@
-
+
\ No newline at end of file
diff --git a/app/src/main/res/menu/menu_activity_color_selection.xml b/app/src/main/res/menu/menu_activity_color_selection.xml
index bc1a2b00..ca8a9d98 100644
--- a/app/src/main/res/menu/menu_activity_color_selection.xml
+++ b/app/src/main/res/menu/menu_activity_color_selection.xml
@@ -10,17 +10,17 @@
android:id="@+id/action_edit"
android:title="@string/rename"
android:icon="@drawable/edit"
- app:showAsAction="always" />
+ app:showAsAction="ifRoom" />
+ app:showAsAction="ifRoom"/>
+ app:showAsAction="ifRoom"/>
\ No newline at end of file
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 48615e4a..dae9fcc1 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -9,10 +9,9 @@
Release: Working copy
Locale: de, German
Exported by: ChilliBits
- Exported at: Tue, 30 Jun 2020 20:30:36 +0100
+ Exported at: Sun, 02 Aug 2020 00:22:26 +0100
-->
- schließen
OK
Abbrechen
@@ -56,7 +55,7 @@
Diese Funktion wird nicht in der Instant-Version der App unterstützt. Bitte installieren Sie die App, um diese Funktion zu nutzen.
Installieren Sie diese App um alle Funktionen zu genießen, auch Funktionen, die wir in der Instant-Version der App nicht unterstützen.
Diese Berechtigungen werden benötigt, damit dieses Feature funktioniert.
- Für Galerie Bilder hochwischen
+ Für Galerie Bilder hochwischen
Farbe sprechen
Sprache nicht verfügbar
Initialisierung fehlgeschlagen
diff --git a/app/src/main/res/values-de/strings_colors.xml b/app/src/main/res/values-de/strings_colors.xml
index 38fe9ad5..292dd3a5 100644
--- a/app/src/main/res/values-de/strings_colors.xml
+++ b/app/src/main/res/values-de/strings_colors.xml
@@ -9,7 +9,7 @@
Release: Working copy
Locale: de, German
Exported by: ChilliBits
- Exported at: Tue, 30 Jun 2020 20:30:36 +0100
+ Exported at: Sun, 02 Aug 2020 00:22:26 +0100
-->
Aliceblau
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 55a8f83a..7a210f97 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -9,10 +9,9 @@
Release: Working copy
Locale: es, Spanish
Exported by: ChilliBits
- Exported at: Tue, 30 Jun 2020 20:30:36 +0100
+ Exported at: Sun, 02 Aug 2020 00:22:26 +0100
-->
- cerrar
Aceptar
Cancelar
@@ -56,7 +55,7 @@
Esta característica no es compatible con la versión de la aplicación instantánea. Instala la aplicación para usar esta función.
Instale esta aplicación para disfrutar de todas las funciones y también las funciones que no podemos admitir en la versión de la aplicación instantánea.
La característica necesita los permisos para funcionar.
- Arrastra las imágenes hacia arriba para la galería
+ Arrastra las imágenes hacia arriba para la galería
Hablar color
Idioma no disponible
Inicialización falló
diff --git a/app/src/main/res/values-es/strings_colors.xml b/app/src/main/res/values-es/strings_colors.xml
index a9b58ad3..aae6b662 100644
--- a/app/src/main/res/values-es/strings_colors.xml
+++ b/app/src/main/res/values-es/strings_colors.xml
@@ -9,7 +9,7 @@
Release: Working copy
Locale: es, Spanish
Exported by: ChilliBits
- Exported at: Tue, 30 Jun 2020 20:30:36 +0100
+ Exported at: Sun, 02 Aug 2020 00:22:26 +0100
-->
Azul Alicia
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 3e8b04f5..9becb5d6 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -9,10 +9,9 @@
Release: Working copy
Locale: fr, French
Exported by: ChilliBits
- Exported at: Tue, 30 Jun 2020 20:30:36 +0100
+ Exported at: Sun, 02 Aug 2020 00:22:26 +0100
-->
- fermer
OK
Annuler
@@ -56,7 +55,7 @@
Cette fonctionnalité n\'est pas prise en charge dans la version de l\'application instantanée. Installez l\'application pour utiliser cette fonctionnalité, s\'il vous plaît.
Installez cette application pour profiter de toutes les fonctionnalités et des fonctionnalités que nous ne pouvons pas prendre en charge dans la version de l\'application instantanée.
La fonctionnalité a besoin des autorisations pour fonctionner.
- Glissez les images en haut pour entrer la galerie
+ Glissez les images en haut pour entrer la galerie
Parler couleur
Langue n\'est pas disponible
Initialisation échouée
diff --git a/app/src/main/res/values-fr/strings_colors.xml b/app/src/main/res/values-fr/strings_colors.xml
index 0d165f73..6ae4ddb4 100644
--- a/app/src/main/res/values-fr/strings_colors.xml
+++ b/app/src/main/res/values-fr/strings_colors.xml
@@ -9,7 +9,7 @@
Release: Working copy
Locale: fr, French
Exported by: ChilliBits
- Exported at: Tue, 30 Jun 2020 20:30:36 +0100
+ Exported at: Sun, 02 Aug 2020 00:22:26 +0100
-->
Bleu alice
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 2812aa57..4de60608 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -9,10 +9,9 @@
Release: Working copy
Locale: ru, Russian
Exported by: ChilliBits
- Exported at: Tue, 30 Jun 2020 20:30:36 +0100
+ Exported at: Sun, 02 Aug 2020 00:22:26 +0100
-->
- закрыть
ОК
Отмена
@@ -30,7 +29,7 @@
Если Вам нравится наше приложение, пожалуйста, потратьте минуту и оцените Color Converter на 5 звезд в Google Play!
Рекомендовать приложение
Рекомендовать
- Порекомендовать Color Converter друзьям!
+ Порекомендуйте Color Converter друзьям!
Color Converter: Преобразование цветов, выбор цвета с изображения и многое другое! Легкий инструмент для программистов и дизайнеров.\u0020\u0020Скачать в Google Play: \nhttps://play.google.com/store/apps/details?id=com.mrgames13.jimdo.colorconverter
Коснитесь цвета, чтобы применить
Оценить
@@ -52,11 +51,11 @@
Действие отключено
Выбрать цвет с фото
- Установите приложение
+ Установить приложение
Эта функция не поддерживается в мгновенной версии приложения.\u0020\u0020Пожалуйста, установите приложение, чтобы использовать эту функцию.
Установите это приложение, чтобы использовать все функции, а также функции, которые мы не можем поддерживать в мгновенной версии приложения.
Для работы функции требуются разрешения.
- Потяните вверх для просмотра галереи
+ Потяните вверх для просмотра галереи
Произнести название цвета
Язык не доступен
Ошибка инициализации
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 14eac4e4..985b90c1 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -9,10 +9,9 @@
Release: Working copy
Locale: en, English
Exported by: ChilliBits
- Exported at: Tue, 30 Jun 2020 20:30:35 +0100
+ Exported at: Sun, 02 Aug 2020 00:26:25 +0100
-->
- close
OK
Cancel
@@ -56,12 +55,12 @@
This feature is not supported in the instant app version. Please install the app to use this feature.
Install this app to enjoy all the features and also the features we cannot support in the instant app version.
The feature needs the permissions to work.
- Drag images up for gallery
+ Drag images up for gallery
Speak color
Language not available
Initialization failed
Please increase volume
- Transparancy warning
+ Transparency warning
You selected a transparent or almost transparent color. This has the effect, that color changes are not visible any more. To regain control over the color, please move the transparency slider to the right.
Remember selection
CMYK code
diff --git a/app/src/main/res/values/strings_colors.xml b/app/src/main/res/values/strings_colors.xml
index 8520a364..f26e80e6 100644
--- a/app/src/main/res/values/strings_colors.xml
+++ b/app/src/main/res/values/strings_colors.xml
@@ -9,7 +9,7 @@
Release: Working copy
Locale: en, English
Exported by: ChilliBits
- Exported at: Tue, 30 Jun 2020 20:31:19 +0100
+ Exported at: Sun, 02 Aug 2020 00:22:26 +0100
-->
Alice Blue
diff --git a/app/src/main/res/values/strings_untranslatable.xml b/app/src/main/res/values/strings_untranslatable.xml
index 0ca8167e..27bf339e 100644
--- a/app/src/main/res/values/strings_untranslatable.xml
+++ b/app/src/main/res/values/strings_untranslatable.xml
@@ -5,7 +5,6 @@
Color Converter
- Color Converter Image Picker
A
R
G
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 85b3409a..4a7cc68b 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -19,7 +19,7 @@