diff --git a/app/src/main/java/org/mosad/teapod/activity/main/fragments/AboutFragment.kt b/app/src/main/java/org/mosad/teapod/activity/main/fragments/AboutFragment.kt index 6ab9714..ddba535 100644 --- a/app/src/main/java/org/mosad/teapod/activity/main/fragments/AboutFragment.kt +++ b/app/src/main/java/org/mosad/teapod/activity/main/fragments/AboutFragment.kt @@ -1,5 +1,7 @@ package org.mosad.teapod.activity.main.fragments +import android.content.Intent +import android.net.Uri import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -17,6 +19,7 @@ import java.lang.StringBuilder class AboutFragment : Fragment() { + private val teapodRepoUrl = "https://git.mosad.xyz/Seil0/teapod" private lateinit var binding: FragmentAboutBinding override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { @@ -27,7 +30,7 @@ class AboutFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - binding.textVersion.text = getString(R.string.info_about_desc, BuildConfig.VERSION_NAME, getString(R.string.build_time)) + binding.textVersionDesc.text = getString(R.string.version_desc, BuildConfig.VERSION_NAME, getString(R.string.build_time)) getThirdPartyComponents().forEach { thirdParty -> val componentBinding = ItemComponentBinding.inflate(layoutInflater) //(R.layout.item_component, container, false) @@ -44,10 +47,25 @@ class AboutFragment : Fragment() { binding.linearThirdParty.addView(componentBinding.root) } + + initActions() + } + + private fun initActions() { + binding.linearSource.setOnClickListener { + startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(teapodRepoUrl))) + } + + binding.linearLicense.setOnClickListener { + MaterialDialog(requireContext()) + .title(text = License.GPL3.long) + .message(text = parseLicense(R.raw.gpl_3_full)) + .show() + } } private fun getThirdPartyComponents(): List { - return listOf( + return listOf( ThirdPartyComponent("AndroidX", "", "The Android Open Source Project", "https://developer.android.com/jetpack/androidx", License.APACHE2), ThirdPartyComponent("Material Components for Android", "2020", "The Android Open Source Project", @@ -79,13 +97,10 @@ class AboutFragment : Fragment() { License.MIT -> parseLicense(R.raw.mit_full) } - println("showing: ${license.long}") - MaterialDialog(requireContext()) .title(text = license.long) .message(text = licenseText) .show() - } private fun parseLicense(@RawRes id: Int): String { diff --git a/app/src/main/res/drawable/ic_baseline_code_24.xml b/app/src/main/res/drawable/ic_baseline_code_24.xml new file mode 100644 index 0000000..2f812a4 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_code_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_description_24.xml b/app/src/main/res/drawable/ic_baseline_description_24.xml new file mode 100644 index 0000000..e7ef3d4 --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_description_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_baseline_info_24.xml b/app/src/main/res/drawable/ic_baseline_info_24.xml deleted file mode 100644 index 17255b7..0000000 --- a/app/src/main/res/drawable/ic_baseline_info_24.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_baseline_people_24.xml b/app/src/main/res/drawable/ic_baseline_people_24.xml new file mode 100644 index 0000000..6fc325a --- /dev/null +++ b/app/src/main/res/drawable/ic_baseline_people_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/drawable/ic_outline_info_24.xml b/app/src/main/res/drawable/ic_outline_info_24.xml new file mode 100644 index 0000000..24bd840 --- /dev/null +++ b/app/src/main/res/drawable/ic_outline_info_24.xml @@ -0,0 +1,5 @@ + + + diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index e00087f..9c08f62 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -1,5 +1,7 @@ - @@ -30,23 +32,13 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="5dp" - android:layout_marginTop="7dp" + android:layout_marginTop="12dp" android:layout_marginEnd="5dp" android:text="@string/app_name" android:textAlignment="center" android:textSize="20sp" android:textStyle="bold" /> - - + android:layout_marginBottom="12dp" + android:text="@string/about_info" /> - + android:layout_height="match_parent" + android:foreground="?android:selectableItemBackground" + android:gravity="center" + android:orientation="horizontal" + android:padding="7dp"> - + + + + + + + + + + + android:layout_height="match_parent" + android:foreground="?android:selectableItemBackground" + android:gravity="center" + android:orientation="horizontal" + android:padding="7dp"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -107,5 +257,18 @@ android:orientation="vertical" /> + + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_account.xml b/app/src/main/res/layout/fragment_account.xml index c4d7da7..375c960 100644 --- a/app/src/main/res/layout/fragment_account.xml +++ b/app/src/main/res/layout/fragment_account.xml @@ -312,7 +312,7 @@ android:minHeight="48dp" android:padding="9dp" android:scaleType="fitXY" - app:srcCompat="@drawable/ic_baseline_info_24" + app:srcCompat="@drawable/ic_outline_info_24" app:tint="?iconColor" /> + app:drawableTopCompat="@drawable/ic_outline_info_24" /> Dunkel - - Teapod ist eine inoffizielle App für Anime on Demand. - Sie wird unter den Bedingungen der GNU GPL 3 oder höher zur Verfügung gestellt. - \n\n - © 2020-2021 seil0@mosad.xyz - + Version + Autor + Quellcode + Lizenz + Eine inoffizielle App für Anime on Demand. Lizenzen von Drittanbietern © %1$s %2$s unter %3$s diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 665db70..1c6411c 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -56,14 +56,16 @@ Dark - - Teapod is an unofficial app for anime on demand. - It is published under the terms and conditions of the GNU GPL 3 or later. - \n\n - © 2020-2021 seil0@mosad.xyz - - This product uses the TMDb API but is not endorsed or certified by TMDb. + Version + %1$s (%2$s) + Author + seil0@mosad.xyz + Source code git.mosad.xyz/Seil0/teapod + License + GNU General Public License 3 + An unofficial app for anime on demand. + This product uses the TMDb API but is not endorsed or certified by TMDb. Third Party Licenses © %1$s %2$s under %3$s