Reformat and optimize code
This commit is contained in:
parent
f71658746d
commit
bba01fc6cf
13 changed files with 8 additions and 21 deletions
|
@ -5,10 +5,8 @@ import android.content.Intent
|
|||
import android.content.pm.PackageManager
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.webkit.MimeTypeMap
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.core.app.ActivityCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
|
|
|
@ -3,11 +3,11 @@ package eu.depau.etchdroid.activities
|
|||
import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import eu.depau.etchdroid.R
|
||||
import eu.depau.etchdroid.adapters.LicenseRecyclerViewAdapter
|
||||
import eu.depau.etchdroid.utils.ClickListener
|
||||
|
|
|
@ -52,7 +52,7 @@ class StartActivity : ActivityBase() {
|
|||
}
|
||||
|
||||
if (showDMGDialog && shouldShowDMGAlertDialog && StateKeeper.flashMethod == FlashMethod.FLASH_DMG_API) {
|
||||
showDMGBetaAlertDialog {onButtonClicked(view, false, showAndroidPieDialog)}
|
||||
showDMGBetaAlertDialog { onButtonClicked(view, false, showAndroidPieDialog) }
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
package eu.depau.etchdroid.adapters
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import eu.depau.etchdroid.R
|
||||
import eu.depau.etchdroid.utils.License
|
||||
import kotlinx.android.synthetic.main.license_row.view.*
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package eu.depau.etchdroid.adapters
|
||||
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.LinearLayout
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import eu.depau.etchdroid.R
|
||||
import eu.depau.etchdroid.kotlin_exts.toHRSize
|
||||
import eu.depau.etchdroid.utils.Partition
|
||||
|
|
|
@ -2,10 +2,10 @@ package eu.depau.etchdroid.adapters
|
|||
|
||||
import android.annotation.SuppressLint
|
||||
import android.os.Build
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import android.widget.RelativeLayout
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.github.mjdev.libaums.UsbMassStorageDevice
|
||||
import eu.depau.etchdroid.R
|
||||
import eu.depau.etchdroid.kotlin_exts.vidpid
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package eu.depau.etchdroid.kotlin_exts
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Context.MODE_PRIVATE
|
||||
import android.os.Build
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package eu.depau.etchdroid.kotlin_exts
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
import android.view.View
|
||||
import com.google.android.material.snackbar.Snackbar
|
||||
|
||||
fun View.snackbar(message: CharSequence, duration: Int = Snackbar.LENGTH_LONG) {
|
||||
Snackbar.make(this, message, duration).show()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package eu.depau.etchdroid.utils
|
||||
|
||||
import android.content.Context
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import android.view.GestureDetector
|
||||
import android.view.MotionEvent
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
||||
class RecyclerViewTouchListener(context: Context, val recyclerView: RecyclerView, val clickListener: ClickListener) : RecyclerView.OnItemTouchListener {
|
||||
private var gestureDetector: GestureDetector
|
||||
|
|
|
@ -108,7 +108,6 @@
|
|||
<string name="android_pie_bug_dialog_text">A causa di un bug di Android 9, alcune scritture potrebbero fallire.\nSe appare un messaggio di errore \"Scrittura fallita\", riavvia il dispositivo e prova di nuovo.</string>
|
||||
<string name="reset_warnings">Reimposta tutti gli avvisi</string>
|
||||
<string name="warnings_reset">Tutti gli avvisi sono stati ripristinati</string>
|
||||
<string name="flash_iso_image">Scrivi ISO su USB</string>
|
||||
<string name="file_type_not_supported">Tipo di file non supportato</string>
|
||||
<string name="cannot_find_file_in_storage">Impossibile trovare file nella memoria interna. Prova ad aprirlo da dentro l\'app.</string>
|
||||
<string name="storage_permission_required">Il permesso per l\'archiviazione è richiesto per leggere i file DMG</string>
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Dark application theme. -->
|
||||
<style name="MaterialAppBaseTheme" parent="Theme.AppCompat">
|
||||
<item name="cardStyle">@style/CardViewStyle.Dark</item>
|
||||
</style>
|
||||
|
||||
<style name="DarkThemeOverlayBase" parent="ThemeOverlay.AppCompat.Dark">
|
||||
<item name="android:windowBackground">@color/background</item>
|
||||
</style>
|
||||
|
||||
<style name="CardViewStyle.Dark" parent="CardView.Dark">
|
||||
<item name="cardBackgroundColor">@android:color/background_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="CardContentStyleBase" parent="ThemeOverlay.AppCompat.Dark">
|
||||
<item name="android:background">@color/colorPrimary</item>
|
||||
</style>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Light application theme. -->
|
||||
<style name="MaterialAppBaseTheme" parent="Theme.AppCompat.Light.NoActionBar"/>
|
||||
|
||||
<style name="DarkThemeOverlayBase">
|
||||
<item name="android:windowBackground">@color/background</item>
|
||||
|
|
|
@ -107,7 +107,6 @@
|
|||
<string name="android_pie_bug_dialog_text">There is a bug on Android 9 which causes some writes to fail.\nIf it says \"Write failed\", reboot your device and try again.</string>
|
||||
<string name="reset_warnings">Reset all warnings</string>
|
||||
<string name="warnings_reset">All warning dialogs restored</string>
|
||||
<string name="flash_iso_image">Flash ISO to USB</string>
|
||||
<string name="file_type_not_supported">File type not supported</string>
|
||||
<string name="cannot_find_file_in_storage">Cannot find file in internal storage. Try opening it from within the app.</string>
|
||||
<string name="storage_permission_required">Storage permission is required to read DMG images</string>
|
||||
|
|
Loading…
Reference in a new issue