updating gradle, commons
This commit is contained in:
parent
d941b1d9a5
commit
34d9b27367
|
@ -41,7 +41,7 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:5.1.4'
|
implementation 'com.simplemobiletools:commons:5.11.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
Properties props = new Properties()
|
Properties props = new Properties()
|
||||||
|
|
|
@ -27,7 +27,6 @@ class SettingsActivity : SimpleActivity() {
|
||||||
setupPurchaseThankYou()
|
setupPurchaseThankYou()
|
||||||
setupCustomizeColors()
|
setupCustomizeColors()
|
||||||
setupUseEnglish()
|
setupUseEnglish()
|
||||||
setupAvoidWhatsNew()
|
|
||||||
setupSound()
|
setupSound()
|
||||||
setupFocusBeforeCapture()
|
setupFocusBeforeCapture()
|
||||||
setupVolumeButtonsAsShutter()
|
setupVolumeButtonsAsShutter()
|
||||||
|
@ -85,14 +84,6 @@ class SettingsActivity : SimpleActivity() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupAvoidWhatsNew() {
|
|
||||||
settings_avoid_whats_new.isChecked = config.avoidWhatsNew
|
|
||||||
settings_avoid_whats_new_holder.setOnClickListener {
|
|
||||||
settings_avoid_whats_new.toggle()
|
|
||||||
config.avoidWhatsNew = settings_avoid_whats_new.isChecked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun launchAbout() {
|
private fun launchAbout() {
|
||||||
val licenses = LICENSE_GLIDE
|
val licenses = LICENSE_GLIDE
|
||||||
|
|
||||||
|
@ -177,8 +168,9 @@ class SettingsActivity : SimpleActivity() {
|
||||||
settings_save_photos.text = getLastPart(config.savePhotosFolder)
|
settings_save_photos.text = getLastPart(config.savePhotosFolder)
|
||||||
settings_save_photos_holder.setOnClickListener {
|
settings_save_photos_holder.setOnClickListener {
|
||||||
FilePickerDialog(this, config.savePhotosFolder, false, showFAB = true) {
|
FilePickerDialog(this, config.savePhotosFolder, false, showFAB = true) {
|
||||||
|
val path = it
|
||||||
handleSAFDialog(it) {
|
handleSAFDialog(it) {
|
||||||
config.savePhotosFolder = it
|
config.savePhotosFolder = path
|
||||||
settings_save_photos.text = getLastPart(config.savePhotosFolder)
|
settings_save_photos.text = getLastPart(config.savePhotosFolder)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@ import android.content.Intent
|
||||||
import com.simplemobiletools.commons.activities.BaseSplashActivity
|
import com.simplemobiletools.commons.activities.BaseSplashActivity
|
||||||
|
|
||||||
class SplashActivity : BaseSplashActivity() {
|
class SplashActivity : BaseSplashActivity() {
|
||||||
|
override fun getAppPackageName() = packageName
|
||||||
|
|
||||||
override fun initActivity() {
|
override fun initActivity() {
|
||||||
startActivity(Intent(this, MainActivity::class.java))
|
startActivity(Intent(this, MainActivity::class.java))
|
||||||
finish()
|
finish()
|
||||||
|
|
|
@ -46,7 +46,7 @@ class PhotoProcessor(val activity: MainActivity, val saveUri: Uri?, val deviceOr
|
||||||
|
|
||||||
val photoFile = File(path)
|
val photoFile = File(path)
|
||||||
if (activity.needsStupidWritePermissions(path)) {
|
if (activity.needsStupidWritePermissions(path)) {
|
||||||
if (!activity.hasProperStoredTreeUri()) {
|
if (!activity.hasProperStoredTreeUri(activity.isPathOnOTG(path))) {
|
||||||
activity.toast(R.string.save_error_internal_storage)
|
activity.toast(R.string.save_error_internal_storage)
|
||||||
activity.config.savePhotosFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString()
|
activity.config.savePhotosFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM).toString()
|
||||||
return ""
|
return ""
|
||||||
|
@ -107,7 +107,7 @@ class PhotoProcessor(val activity: MainActivity, val saveUri: Uri?, val deviceOr
|
||||||
|
|
||||||
try {
|
try {
|
||||||
image.compress(Bitmap.CompressFormat.JPEG, activity.config.photoQuality, fos)
|
image.compress(Bitmap.CompressFormat.JPEG, activity.config.photoQuality, fos)
|
||||||
if (!isThirdPartyIntent) {
|
if (!isThirdPartyIntent && isNougatPlus()) {
|
||||||
activity.saveImageRotation(path, totalRotation)
|
activity.saveImageRotation(path, totalRotation)
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|
|
@ -29,7 +29,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/purchase_simple_thank_you"/>
|
android:text="@string/purchase_simple_thank_you"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -51,7 +50,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/customize_colors"/>
|
android:text="@string/customize_colors"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
@ -74,36 +72,11 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/use_english_language"
|
android:text="@string/use_english_language"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:id="@+id/settings_avoid_whats_new_holder"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/medium_margin"
|
|
||||||
android:background="?attr/selectableItemBackground"
|
|
||||||
android:paddingLeft="@dimen/normal_margin"
|
|
||||||
android:paddingTop="@dimen/activity_margin"
|
|
||||||
android:paddingRight="@dimen/normal_margin"
|
|
||||||
android:paddingBottom="@dimen/activity_margin">
|
|
||||||
|
|
||||||
<com.simplemobiletools.commons.views.MySwitchCompat
|
|
||||||
android:id="@+id/settings_avoid_whats_new"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@null"
|
|
||||||
android:clickable="false"
|
|
||||||
android:paddingStart="@dimen/medium_margin"
|
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/avoid_whats_new"
|
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_keep_settings_visible_holder"
|
android:id="@+id/settings_keep_settings_visible_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -122,13 +95,11 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/keep_settings_visible"
|
android:text="@string/keep_settings_visible"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:id="@+id/settings_focus_before_capture_holder"
|
android:id="@+id/settings_focus_before_capture_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -147,7 +118,6 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/focus_before_capture"
|
android:text="@string/focus_before_capture"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
|
@ -165,7 +135,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/bigger_margin"
|
android:layout_marginStart="@dimen/bigger_margin"
|
||||||
android:layout_marginLeft="@dimen/bigger_margin"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/activity_margin"
|
||||||
android:text="@string/shutter"
|
android:text="@string/shutter"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
|
@ -189,7 +158,6 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/shutter_sound"
|
android:text="@string/shutter_sound"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
|
@ -213,7 +181,6 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/volume_buttons_as_shutter"
|
android:text="@string/volume_buttons_as_shutter"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
|
@ -231,7 +198,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/bigger_margin"
|
android:layout_marginStart="@dimen/bigger_margin"
|
||||||
android:layout_marginLeft="@dimen/bigger_margin"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/activity_margin"
|
||||||
android:text="@string/startup"
|
android:text="@string/startup"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
|
@ -255,7 +221,6 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/turn_flash_off_at_startup"
|
android:text="@string/turn_flash_off_at_startup"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
|
@ -279,7 +244,6 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/always_open_back_camera"
|
android:text="@string/always_open_back_camera"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
|
@ -297,7 +261,6 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="@dimen/bigger_margin"
|
android:layout_marginStart="@dimen/bigger_margin"
|
||||||
android:layout_marginLeft="@dimen/bigger_margin"
|
|
||||||
android:layout_marginTop="@dimen/activity_margin"
|
android:layout_marginTop="@dimen/activity_margin"
|
||||||
android:text="@string/saving_label"
|
android:text="@string/saving_label"
|
||||||
android:textAllCaps="true"
|
android:textAllCaps="true"
|
||||||
|
@ -321,7 +284,6 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/save_photo_metadata"
|
android:text="@string/save_photo_metadata"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
|
@ -345,7 +307,6 @@
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"
|
android:clickable="false"
|
||||||
android:paddingStart="@dimen/medium_margin"
|
android:paddingStart="@dimen/medium_margin"
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
|
||||||
android:text="@string/flip_front_camera_photos_horizontally"
|
android:text="@string/flip_front_camera_photos_horizontally"
|
||||||
app:switchPadding="@dimen/medium_margin"/>
|
app:switchPadding="@dimen/medium_margin"/>
|
||||||
|
|
||||||
|
@ -368,7 +329,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toStartOf="@+id/settings_save_photos"
|
android:layout_toStartOf="@+id/settings_save_photos"
|
||||||
android:layout_toLeftOf="@+id/settings_save_photos"
|
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:paddingRight="@dimen/medium_margin"
|
android:paddingRight="@dimen/medium_margin"
|
||||||
android:text="@string/save_photos"/>
|
android:text="@string/save_photos"/>
|
||||||
|
@ -378,9 +338,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginEnd="@dimen/small_margin"
|
android:layout_marginEnd="@dimen/small_margin"
|
||||||
android:layout_marginRight="@dimen/small_margin"
|
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"/>
|
android:clickable="false"/>
|
||||||
|
|
||||||
|
@ -403,7 +361,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_toStartOf="@+id/settings_photo_quality"
|
android:layout_toStartOf="@+id/settings_photo_quality"
|
||||||
android:layout_toLeftOf="@+id/settings_photo_quality"
|
|
||||||
android:paddingLeft="@dimen/medium_margin"
|
android:paddingLeft="@dimen/medium_margin"
|
||||||
android:paddingRight="@dimen/medium_margin"
|
android:paddingRight="@dimen/medium_margin"
|
||||||
android:text="@string/photo_compression_quality"/>
|
android:text="@string/photo_compression_quality"/>
|
||||||
|
@ -413,9 +370,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_alignParentEnd="true"
|
android:layout_alignParentEnd="true"
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_marginEnd="@dimen/small_margin"
|
android:layout_marginEnd="@dimen/small_margin"
|
||||||
android:layout_marginRight="@dimen/small_margin"
|
|
||||||
android:background="@null"
|
android:background="@null"
|
||||||
android:clickable="false"/>
|
android:clickable="false"/>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue