Über-Seite hinzugefügt
@ -0,0 +1,68 @@
|
|||||||
|
package com.cyb3rko.techniklogger.utils
|
||||||
|
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.view.MenuItem
|
||||||
|
import android.view.View
|
||||||
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
|
import com.cyb3rko.techniklogger.BuildConfig
|
||||||
|
import com.cyb3rko.techniklogger.R
|
||||||
|
import com.mikepenz.aboutlibraries.LibsBuilder
|
||||||
|
import mehdi.sakout.aboutpage.AboutPage
|
||||||
|
import mehdi.sakout.aboutpage.Element
|
||||||
|
|
||||||
|
class About : AppCompatActivity() {
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
|
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
||||||
|
|
||||||
|
val aboutPage: View = AboutPage(this)
|
||||||
|
.setImage(R.mipmap.ic_launcher_foreground)
|
||||||
|
.setDescription("App zur Vereinfachung des Protokollierens aller Technik-Einsätze")
|
||||||
|
.addItem(Element().setTitle("Version ${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})")
|
||||||
|
.setIconDrawable(R.drawable.about_icon_github))
|
||||||
|
.addGroup("Credits")
|
||||||
|
.addItem(Element().setTitle("Benutzte Libraries").setIconDrawable(R.drawable._icon_libraries).setOnClickListener(showLibraries()))
|
||||||
|
// .addItem(Element().setTitle("Benutzte Icons").setIconDrawable(R.drawable._icon_question).setOnClickListener(showIcons()))
|
||||||
|
.create()
|
||||||
|
|
||||||
|
setContentView(aboutPage)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showLibraries() : View.OnClickListener {
|
||||||
|
return View.OnClickListener {
|
||||||
|
LibsBuilder()
|
||||||
|
.withShowLoadingProgress(true)
|
||||||
|
.withAboutVersionShownCode(false)
|
||||||
|
.withAboutVersionShownName(false)
|
||||||
|
.withFields(R.string::class.java.fields)
|
||||||
|
.withAutoDetect(true)
|
||||||
|
.withAboutIconShown(false)
|
||||||
|
.withAboutVersionShown(false)
|
||||||
|
.withVersionShown(true)
|
||||||
|
.withLicenseDialog(true)
|
||||||
|
.withLicenseShown(true)
|
||||||
|
.withCheckCachedDetection(true)
|
||||||
|
.withSortEnabled(true)
|
||||||
|
.start(application)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// private fun showIcons() : View.OnClickListener {
|
||||||
|
// return View.OnClickListener {
|
||||||
|
// startActivity(Intent(applicationContext, IconCredits::class.java))
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||||
|
// Handle action bar item clicks here. The action bar will
|
||||||
|
// automatically handle clicks on the Home/Up button, so long
|
||||||
|
// as you specify a parent activity in AndroidManifest.xml.
|
||||||
|
when (item.itemId) {
|
||||||
|
android.R.id.home -> finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
return super.onOptionsItemSelected(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 10 KiB |