From c59b719b92bdfe5578fdeff18462d971d382a32e Mon Sep 17 00:00:00 2001 From: Bnyro Date: Sun, 3 Jul 2022 14:43:29 +0200 Subject: [PATCH] convert about to cardviews --- .../libretube/preferences/AboutFragment.kt | 4 +- app/src/main/res/layout/fragment_about.xml | 183 ++++++++++-------- app/src/main/res/layout/fragment_player.xml | 5 +- app/src/main/res/values/strings.xml | 1 + app/src/main/res/values/style.xml | 29 ++- 5 files changed, 139 insertions(+), 83 deletions(-) diff --git a/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt b/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt index 0584e92be..e0d34b2f1 100644 --- a/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt +++ b/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt @@ -16,6 +16,7 @@ import com.github.libretube.util.AUTHORS_URL import com.github.libretube.util.CONTRIBUTING_URL import com.github.libretube.util.DONATE_URL import com.github.libretube.util.PIPED_GITHUB_URL +import com.github.libretube.util.ThemeHelper import com.github.libretube.util.WEBSITE_URL import com.google.android.material.dialog.MaterialAlertDialogBuilder @@ -33,6 +34,7 @@ class AboutFragment : Fragment() { override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) + val settingsActivity = activity as SettingsActivity settingsActivity.changeTopBarText(getString(R.string.about)) @@ -48,7 +50,7 @@ class AboutFragment : Fragment() { binding.donate.setOnClickListener { openLinkFromHref(DONATE_URL) } - binding.contributing.setOnClickListener { + binding.github.setOnClickListener { openLinkFromHref(CONTRIBUTING_URL) } binding.license.setOnClickListener { diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index 1bf1f174b..9eef298de 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -1,20 +1,21 @@ + android:layout_height="match_parent" + xmlns:app="http://schemas.android.com/apk/res-auto"> - + android:src="@mipmap/ic_launcher_round" /> - + style="@style/AboutCard"> - + - + - + - + + + + + style="@style/AboutCard"> - + - + - + - + + + + + style="@style/AboutCard"> - + - + - + - + + + + + style="@style/AboutCard"> - + - + - + - + + + + + style="@style/AboutCard"> - + - + - + - + + + + + style="@style/AboutCard"> - + - + - + + + + + diff --git a/app/src/main/res/layout/fragment_player.xml b/app/src/main/res/layout/fragment_player.xml index ddeefc704..9bcc7e86e 100644 --- a/app/src/main/res/layout/fragment_player.xml +++ b/app/src/main/res/layout/fragment_player.xml @@ -281,7 +281,10 @@ style="@style/Widget.Material3.CardView.Elevated" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_margin="16dp" + android:layout_marginStart="16dp" + android:layout_marginTop="16dp" + android:layout_marginEnd="16dp" + android:layout_marginBottom="16dp" app:cardCornerRadius="18dp"> Use a different instance for authenticated calls. Choose an auth instance Auto + GitHub \ No newline at end of file diff --git a/app/src/main/res/values/style.xml b/app/src/main/res/values/style.xml index 7b63c7620..49c91f885 100644 --- a/app/src/main/res/values/style.xml +++ b/app/src/main/res/values/style.xml @@ -2,8 +2,17 @@ + + + +