mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-14 22:30:30 +05:30
convert about to cardviews
This commit is contained in:
parent
0c63d836c9
commit
c59b719b92
@ -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 {
|
||||
|
@ -1,20 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
style="@style/roundedImageViewRounded"
|
||||
<com.google.android.material.imageview.ShapeableImageView
|
||||
app:shapeAppearanceOverlay="@style/CircleImageView"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="80dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="30dp"
|
||||
android:src="@mipmap/ic_launcher" />
|
||||
android:src="@mipmap/ic_launcher_round" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
@ -26,8 +27,11 @@
|
||||
android:textSize="27sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/website"
|
||||
style="@style/AboutCard">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/AboutItem">
|
||||
|
||||
<TextView
|
||||
@ -43,8 +47,13 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/contributing"
|
||||
style="@style/AboutCard">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/AboutItem">
|
||||
|
||||
<TextView
|
||||
@ -60,8 +69,13 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/authors"
|
||||
style="@style/AboutCard">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/AboutItem">
|
||||
|
||||
<TextView
|
||||
@ -77,8 +91,13 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/piped"
|
||||
style="@style/AboutCard">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/AboutItem">
|
||||
|
||||
<TextView
|
||||
@ -94,8 +113,13 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/donate"
|
||||
style="@style/AboutCard">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/AboutItem">
|
||||
|
||||
<TextView
|
||||
@ -111,8 +135,13 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/license"
|
||||
style="@style/AboutCard">
|
||||
|
||||
<LinearLayout
|
||||
style="@style/AboutItem">
|
||||
|
||||
<TextView
|
||||
@ -128,6 +157,8 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</ScrollView>
|
@ -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">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -214,4 +214,5 @@
|
||||
<string name="auth_instance_summary">Use a different instance for authenticated calls.</string>
|
||||
<string name="auth_instances">Choose an auth instance</string>
|
||||
<string name="hls">Auto</string>
|
||||
<string name="github">GitHub</string>
|
||||
</resources>
|
@ -2,8 +2,17 @@
|
||||
<resources>
|
||||
|
||||
<style name="roundedImageViewRounded">
|
||||
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">10%</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="CircleImageView">
|
||||
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSize">50%</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="OLED">
|
||||
@ -28,11 +37,21 @@
|
||||
<item name="android:orientation">vertical</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:paddingLeft">20dp</item>
|
||||
<item name="android:paddingRight">20dp</item>
|
||||
<item name="android:paddingTop">12dp</item>
|
||||
<item name="android:paddingBottom">12dp</item>
|
||||
<item name="android:background">?android:attr/selectableItemBackground</item>
|
||||
<item name="android:layout_marginLeft">20dp</item>
|
||||
<item name="android:layout_marginRight">20dp</item>
|
||||
<item name="android:layout_marginTop">12dp</item>
|
||||
<item name="android:layout_marginBottom">12dp</item>
|
||||
|
||||
</style>
|
||||
|
||||
<style name="AboutCard" parent="Widget.Material3.CardView.Elevated">
|
||||
|
||||
<item name="android:layout_margin">5dp</item>
|
||||
<item name="strokeWidth">0dp</item>
|
||||
<item name="cardCornerRadius">20dp</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="cardElevation">5dp</item>
|
||||
|
||||
</style>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user