diff --git a/app/src/main/java/com/stevesoltys/seedvault/settings/AboutDialogFragment.kt b/app/src/main/java/com/stevesoltys/seedvault/settings/AboutDialogFragment.kt index 7f4bdda9..81738a29 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/settings/AboutDialogFragment.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/settings/AboutDialogFragment.kt @@ -6,21 +6,15 @@ import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.widget.TextView -import androidx.fragment.app.DialogFragment +import androidx.fragment.app.Fragment import com.stevesoltys.seedvault.R import com.stevesoltys.seedvault.transport.backup.PackageService import org.koin.android.ext.android.inject -class AboutDialogFragment : DialogFragment() { +class AboutDialogFragment : Fragment() { private val packageService: PackageService by inject() - private lateinit var versionView: TextView - private lateinit var licenseView: TextView - private lateinit var authorView: TextView - private lateinit var designView: TextView - private lateinit var sponsorView: TextView - companion object { internal val TAG = AboutDialogFragment::class.java.simpleName } @@ -32,24 +26,22 @@ class AboutDialogFragment : DialogFragment() { ): View { val v: View = inflater.inflate(R.layout.fragment_about, container, false) - versionView = v.findViewById(R.id.versionView) - licenseView = v.findViewById(R.id.licenseView) - authorView = v.findViewById(R.id.authorView) - designView = v.findViewById(R.id.designView) - sponsorView = v.findViewById(R.id.sponsorView) - val versionName = packageService.getVersionName(requireContext().packageName) ?: "???" + val versionView: TextView = v.findViewById(R.id.versionView) versionView.text = getString(R.string.about_version, versionName) + val linkMovementMethod = LinkMovementMethod.getInstance() + val contributorsView = v.findViewById(R.id.contributorView) + val orgsView = v.findViewById(R.id.about_contributing_organizations_content) + contributorsView.movementMethod = linkMovementMethod + orgsView.movementMethod = linkMovementMethod + return v } - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - val linkMovementMethod = LinkMovementMethod.getInstance() - licenseView.movementMethod = linkMovementMethod - authorView.movementMethod = linkMovementMethod - designView.movementMethod = linkMovementMethod - sponsorView.movementMethod = linkMovementMethod + override fun onStart() { + super.onStart() + activity?.setTitle(R.string.about_title) } } diff --git a/app/src/main/java/com/stevesoltys/seedvault/settings/SettingsFragment.kt b/app/src/main/java/com/stevesoltys/seedvault/settings/SettingsFragment.kt index eb41bd95..93ed0883 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/settings/SettingsFragment.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/settings/SettingsFragment.kt @@ -192,7 +192,10 @@ class SettingsFragment : PreferenceFragmentCompat() { true } R.id.action_about -> { - AboutDialogFragment().show(parentFragmentManager, AboutDialogFragment.TAG) + parentFragmentManager.beginTransaction() + .replace(R.id.fragment, AboutDialogFragment()) + .addToBackStack(AboutDialogFragment.TAG) + .commit() true } else -> super.onOptionsItemSelected(item) diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 061b9e75..9b876085 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -1,147 +1,149 @@ - - + - + - + - + - + - + - + - + - + - + - + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 4cf4a188..9b936b2d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -203,12 +203,11 @@ About - A backup application using Android\'s internal backup API. + A backup application using Android\'s internal backup API. It is Free Software, released under Apache 2 license.\n\nLike all software, Seedvault may contain bugs or vulnerabilities. Version: %s - License: Apache2 - Written by: Steve Soltys and Torsten Grote - Design by: Glenn Sorrentino - Sponsored by: Calyx Institute for use in CalyxOS - Source code: https://github.com/seedvault-app/seedvault + Contributors + Please see GitHub for a list of contributors. + Contributing Organizations + Calyx Institute for use in CalyxOS\nNGI0 PET Fund by NLnet