diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a4e3db1..552299c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ - @@ -10,11 +9,11 @@ android:maxSdkVersion="28" /> + tools:node="remove" /> + android:required="false" /> + android:theme="@style/SplashTheme" /> - + - - + + - + - - - + + + - - - + + + - - + + - - - + + + + android:parentActivityName=".activities.MainActivity" /> + android:parentActivityName=".activities.MainActivity" /> + android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity" /> + android:parentActivityName=".activities.SettingsActivity" /> + android:parentActivityName="com.simplemobiletools.commons.activities.AboutActivity" /> + android:resource="@xml/provider_paths" /> - - + + @@ -121,8 +120,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -134,8 +133,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -147,8 +146,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -160,8 +159,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -173,8 +172,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -186,8 +185,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -199,8 +198,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -212,8 +211,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -225,8 +224,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -238,8 +237,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -251,8 +250,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -264,8 +263,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -277,8 +276,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -289,8 +288,8 @@ android:roundIcon="@mipmap/ic_launcher" android:targetActivity=".activities.SplashActivity"> - - + + @@ -302,8 +301,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -315,8 +314,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -328,8 +327,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + @@ -341,8 +340,8 @@ android:targetActivity=".activities.SplashActivity"> - - + + diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt index 06adf31..cd02e94 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/MainActivity.kt @@ -177,9 +177,9 @@ class MainActivity : SimpleActivity(), CanvasListener { val licenses = LICENSE_GLIDE val faqItems = arrayListOf( - FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons), - FAQItem(R.string.faq_6_title_commons, R.string.faq_6_text_commons), - FAQItem(R.string.faq_7_title_commons, R.string.faq_7_text_commons)) + FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons), + FAQItem(R.string.faq_6_title_commons, R.string.faq_6_text_commons), + FAQItem(R.string.faq_7_title_commons, R.string.faq_7_text_commons)) startAboutActivity(R.string.app_name, licenses, BuildConfig.VERSION_NAME, faqItems, false) } diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/SimpleActivity.kt b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/SimpleActivity.kt index fc04596..3565f73 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/SimpleActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/pro/activities/SimpleActivity.kt @@ -5,25 +5,25 @@ import com.simplemobiletools.draw.pro.R open class SimpleActivity : BaseSimpleActivity() { override fun getAppIconIDs() = arrayListOf( - R.mipmap.ic_launcher_red, - R.mipmap.ic_launcher_pink, - R.mipmap.ic_launcher_purple, - R.mipmap.ic_launcher_deep_purple, - R.mipmap.ic_launcher_indigo, - R.mipmap.ic_launcher_blue, - R.mipmap.ic_launcher_light_blue, - R.mipmap.ic_launcher_cyan, - R.mipmap.ic_launcher_teal, - R.mipmap.ic_launcher_green, - R.mipmap.ic_launcher_light_green, - R.mipmap.ic_launcher_lime, - R.mipmap.ic_launcher_yellow, - R.mipmap.ic_launcher_amber, - R.mipmap.ic_launcher, - R.mipmap.ic_launcher_deep_orange, - R.mipmap.ic_launcher_brown, - R.mipmap.ic_launcher_blue_grey, - R.mipmap.ic_launcher_grey_black + R.mipmap.ic_launcher_red, + R.mipmap.ic_launcher_pink, + R.mipmap.ic_launcher_purple, + R.mipmap.ic_launcher_deep_purple, + R.mipmap.ic_launcher_indigo, + R.mipmap.ic_launcher_blue, + R.mipmap.ic_launcher_light_blue, + R.mipmap.ic_launcher_cyan, + R.mipmap.ic_launcher_teal, + R.mipmap.ic_launcher_green, + R.mipmap.ic_launcher_light_green, + R.mipmap.ic_launcher_lime, + R.mipmap.ic_launcher_yellow, + R.mipmap.ic_launcher_amber, + R.mipmap.ic_launcher, + R.mipmap.ic_launcher_deep_orange, + R.mipmap.ic_launcher_brown, + R.mipmap.ic_launcher_blue_grey, + R.mipmap.ic_launcher_grey_black ) override fun getAppLauncherName() = getString(R.string.app_launcher_name) diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/pro/dialogs/SaveImageDialog.kt b/app/src/main/kotlin/com/simplemobiletools/draw/pro/dialogs/SaveImageDialog.kt index 05c3f93..20321c4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/pro/dialogs/SaveImageDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/pro/dialogs/SaveImageDialog.kt @@ -42,43 +42,43 @@ class SaveImageDialog(val activity: SimpleActivity, val defaultPath: String, val } AlertDialog.Builder(activity) - .setPositiveButton(R.string.ok, null) - .setNegativeButton(R.string.cancel, null) - .create().apply { - activity.setupDialogStuff(view, this, R.string.save_as) { - showKeyboard(view.save_image_filename) - getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { - val filename = view.save_image_filename.value - if (filename.isEmpty()) { - activity.toast(R.string.filename_cannot_be_empty) - return@setOnClickListener - } + .setPositiveButton(R.string.ok, null) + .setNegativeButton(R.string.cancel, null) + .create().apply { + activity.setupDialogStuff(view, this, R.string.save_as) { + showKeyboard(view.save_image_filename) + getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener { + val filename = view.save_image_filename.value + if (filename.isEmpty()) { + activity.toast(R.string.filename_cannot_be_empty) + return@setOnClickListener + } - val extension = when (view.save_image_radio_group.checkedRadioButtonId) { - R.id.save_image_radio_png -> PNG - R.id.save_image_radio_svg -> SVG - else -> JPG - } + val extension = when (view.save_image_radio_group.checkedRadioButtonId) { + R.id.save_image_radio_png -> PNG + R.id.save_image_radio_svg -> SVG + else -> JPG + } - val newPath = "${folder.trimEnd('/')}/$filename.$extension" - if (!newPath.getFilenameFromPath().isAValidFilename()) { - activity.toast(R.string.filename_invalid_characters) - return@setOnClickListener - } + val newPath = "${folder.trimEnd('/')}/$filename.$extension" + if (!newPath.getFilenameFromPath().isAValidFilename()) { + activity.toast(R.string.filename_invalid_characters) + return@setOnClickListener + } - if (!hidePath && File(newPath).exists()) { - val title = String.format(activity.getString(R.string.file_already_exists_overwrite), newPath.getFilenameFromPath()) - ConfirmationDialog(activity, title) { - callback(newPath, filename, extension) - dismiss() - } - } else { + if (!hidePath && File(newPath).exists()) { + val title = String.format(activity.getString(R.string.file_already_exists_overwrite), newPath.getFilenameFromPath()) + ConfirmationDialog(activity, title) { callback(newPath, filename, extension) dismiss() } + } else { + callback(newPath, filename, extension) + dismiss() } } } + } } private fun getInitialFilename(): String { diff --git a/app/src/main/kotlin/com/simplemobiletools/draw/pro/views/MyCanvas.kt b/app/src/main/kotlin/com/simplemobiletools/draw/pro/views/MyCanvas.kt index 091f2f7..67d6c33 100644 --- a/app/src/main/kotlin/com/simplemobiletools/draw/pro/views/MyCanvas.kt +++ b/app/src/main/kotlin/com/simplemobiletools/draw/pro/views/MyCanvas.kt @@ -28,8 +28,8 @@ class MyCanvas(context: Context, attrs: AttributeSet) : View(context, attrs) { var mListener: CanvasListener? = null private var mLastPaths = LinkedHashMap() - private var mLastBackgroundBitmap: Bitmap? = null private var mUndonePaths = LinkedHashMap() + private var mLastBackgroundBitmap: Bitmap? = null private var mPaint = Paint() private var mPath = MyPath() @@ -142,16 +142,16 @@ class MyCanvas(context: Context, attrs: AttributeSet) : View(context, attrs) { val size = Point() activity.windowManager.defaultDisplay.getSize(size) val options = RequestOptions() - .format(DecodeFormat.PREFER_ARGB_8888) - .disallowHardwareConfig() - .fitCenter() + .format(DecodeFormat.PREFER_ARGB_8888) + .disallowHardwareConfig() + .fitCenter() try { val builder = Glide.with(context) - .asBitmap() - .load(path) - .apply(options) - .into(size.x, size.y) + .asBitmap() + .load(path) + .apply(options) + .into(size.x, size.y) mBackgroundBitmap = builder.get() activity.runOnUiThread { diff --git a/app/src/main/res/drawable/circle_background.xml b/app/src/main/res/drawable/circle_background.xml index 5ef6967..65a6a6e 100644 --- a/app/src/main/res/drawable/circle_background.xml +++ b/app/src/main/res/drawable/circle_background.xml @@ -1,13 +1,11 @@ - - + + android:color="@android:color/white" /> diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index b03930e..5f9e32b 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -17,9 +17,9 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingLeft="@dimen/normal_margin" + android:paddingStart="@dimen/normal_margin" android:paddingTop="@dimen/activity_margin" - android:paddingRight="@dimen/normal_margin" + android:paddingEnd="@dimen/normal_margin" android:paddingBottom="@dimen/activity_margin"> @@ -39,9 +38,9 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingLeft="@dimen/normal_margin" + android:paddingStart="@dimen/normal_margin" android:paddingTop="@dimen/activity_margin" - android:paddingRight="@dimen/normal_margin" + android:paddingEnd="@dimen/normal_margin" android:paddingBottom="@dimen/activity_margin"> @@ -63,9 +61,9 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingLeft="@dimen/normal_margin" + android:paddingStart="@dimen/normal_margin" android:paddingTop="@dimen/activity_margin" - android:paddingRight="@dimen/normal_margin" + android:paddingEnd="@dimen/normal_margin" android:paddingBottom="@dimen/activity_margin"> @@ -87,9 +84,9 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingLeft="@dimen/normal_margin" + android:paddingStart="@dimen/normal_margin" android:paddingTop="@dimen/activity_margin" - android:paddingRight="@dimen/normal_margin" + android:paddingEnd="@dimen/normal_margin" android:paddingBottom="@dimen/activity_margin"> @@ -111,9 +107,9 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingLeft="@dimen/normal_margin" + android:paddingStart="@dimen/normal_margin" android:paddingTop="@dimen/activity_margin" - android:paddingRight="@dimen/normal_margin" + android:paddingEnd="@dimen/normal_margin" android:paddingBottom="@dimen/activity_margin"> @@ -135,9 +130,9 @@ android:layout_height="wrap_content" android:layout_marginTop="@dimen/medium_margin" android:background="?attr/selectableItemBackground" - android:paddingLeft="@dimen/normal_margin" + android:paddingStart="@dimen/normal_margin" android:paddingTop="@dimen/activity_margin" - android:paddingRight="@dimen/normal_margin" + android:paddingEnd="@dimen/normal_margin" android:paddingBottom="@dimen/activity_margin">