|
|
|
@ -3,6 +3,7 @@ package com.cyb3rko.techniklogger.fragments
|
|
|
|
import android.animation.Animator
|
|
|
|
import android.animation.Animator
|
|
|
|
import android.content.Context
|
|
|
|
import android.content.Context
|
|
|
|
import android.content.SharedPreferences
|
|
|
|
import android.content.SharedPreferences
|
|
|
|
|
|
|
|
import android.os.Build
|
|
|
|
import android.os.Bundle
|
|
|
|
import android.os.Bundle
|
|
|
|
import android.util.Log
|
|
|
|
import android.util.Log
|
|
|
|
import android.view.*
|
|
|
|
import android.view.*
|
|
|
|
@ -15,6 +16,7 @@ import com.cyb3rko.techniklogger.databinding.FragmentListingBinding
|
|
|
|
import com.cyb3rko.techniklogger.recycler.ProjectEntry
|
|
|
|
import com.cyb3rko.techniklogger.recycler.ProjectEntry
|
|
|
|
import com.cyb3rko.techniklogger.recycler.ProjectsAdapter
|
|
|
|
import com.cyb3rko.techniklogger.recycler.ProjectsAdapter
|
|
|
|
import com.cyb3rko.techniklogger.table.ExportBuilder
|
|
|
|
import com.cyb3rko.techniklogger.table.ExportBuilder
|
|
|
|
|
|
|
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
|
|
|
import com.parse.ParseObject
|
|
|
|
import com.parse.ParseObject
|
|
|
|
import com.parse.ParseQuery
|
|
|
|
import com.parse.ParseQuery
|
|
|
|
import es.dmoral.toasty.Toasty
|
|
|
|
import es.dmoral.toasty.Toasty
|
|
|
|
@ -285,6 +287,32 @@ class ListingFragment : Fragment() {
|
|
|
|
when (item.itemId) {
|
|
|
|
when (item.itemId) {
|
|
|
|
R.id.action_year -> findNavController().navigate(R.id.navigation_years)
|
|
|
|
R.id.action_year -> findNavController().navigate(R.id.navigation_years)
|
|
|
|
R.id.action_rename -> showNameDialog(requireActivity() as MainActivity, sharedPref, sharedPrefEditor, true)
|
|
|
|
R.id.action_rename -> showNameDialog(requireActivity() as MainActivity, sharedPref, sharedPrefEditor, true)
|
|
|
|
|
|
|
|
R.id.action_info -> {
|
|
|
|
|
|
|
|
var info = "App-Version: ${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})"
|
|
|
|
|
|
|
|
info += "\nBuild-Typ: ${BuildConfig.BUILD_TYPE}"
|
|
|
|
|
|
|
|
info += "\nGerät: ${Build.MANUFACTURER} ${Build.MODEL}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
val androidVersion = Build.VERSION.SDK_INT
|
|
|
|
|
|
|
|
val androidName = "Android " + when (androidVersion) {
|
|
|
|
|
|
|
|
19, 20 -> "4"
|
|
|
|
|
|
|
|
21, 22 -> "5"
|
|
|
|
|
|
|
|
23 -> "6"
|
|
|
|
|
|
|
|
24, 25 -> "7"
|
|
|
|
|
|
|
|
26, 27 -> "8"
|
|
|
|
|
|
|
|
28 -> "9"
|
|
|
|
|
|
|
|
29 -> "10"
|
|
|
|
|
|
|
|
30 -> "11"
|
|
|
|
|
|
|
|
31, 32 -> "12"
|
|
|
|
|
|
|
|
33 -> "13"
|
|
|
|
|
|
|
|
else -> "> 13"
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
info += "\nSoftware: $androidName ($androidVersion)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MaterialAlertDialogBuilder(myContext)
|
|
|
|
|
|
|
|
.setTitle("App-Informationen")
|
|
|
|
|
|
|
|
.setMessage(info)
|
|
|
|
|
|
|
|
.show()
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return super.onOptionsItemSelected(item)
|
|
|
|
return super.onOptionsItemSelected(item)
|
|
|
|
|