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 a07fba74f..4e94e20e9 100644 --- a/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt +++ b/app/src/main/java/com/github/libretube/preferences/AboutFragment.kt @@ -8,12 +8,12 @@ import android.text.Html import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import android.widget.LinearLayout import android.widget.TextView import androidx.fragment.app.Fragment import com.github.libretube.BuildConfig import com.github.libretube.R import com.github.libretube.util.checkUpdate -import com.google.android.material.card.MaterialCardView import com.google.android.material.dialog.MaterialAlertDialogBuilder class AboutFragment : Fragment() { @@ -33,19 +33,23 @@ class AboutFragment : Fragment() { val appVersion = view?.findViewById(R.id.app_version) appVersion.text = BuildConfig.VERSION_NAME - val website = view?.findViewById(R.id.website) + val website = view?.findViewById(R.id.website) website?.setOnClickListener { - openLink("https://libre-tube.github.io/") + openLinkFromHref("https://libre-tube.github.io/") } - val donate = view?.findViewById(R.id.donate) + val authors = view?.findViewById(R.id.authors) + authors?.setOnClickListener { + openLinkFromHref("https://github.com/libre-tube/LibreTube/graphs/contributors") + } + val donate = view?.findViewById(R.id.donate) donate?.setOnClickListener { - openLink("https://libre-tube.github.io/#donate") + openLinkFromHref("https://libre-tube.github.io/#donate") } - val contributing = view?.findViewById(R.id.contributing) + val contributing = view?.findViewById(R.id.contributing) contributing?.setOnClickListener { - openLink("https://github.com/libre-tube/LibreTube") + openLinkFromHref("https://github.com/libre-tube/LibreTube") } - val license = view.findViewById(R.id.license) + val license = view.findViewById(R.id.license) license?.setOnClickListener { val licenseString = view?.context?.assets!! .open("gpl3.html").bufferedReader().use { @@ -61,13 +65,13 @@ class AboutFragment : Fragment() { .show() true } - val update = view.findViewById(R.id.update) + val update = view.findViewById(R.id.update) update?.setOnClickListener { checkUpdate(childFragmentManager) } } - private fun openLink(link: String) { + private fun openLinkFromHref(link: String) { val uri = Uri.parse(link) val intent = Intent(Intent.ACTION_VIEW).setData(uri) startActivity(intent) diff --git a/app/src/main/res/layout/fragment_about.xml b/app/src/main/res/layout/fragment_about.xml index f920863d3..8e92d159f 100644 --- a/app/src/main/res/layout/fragment_about.xml +++ b/app/src/main/res/layout/fragment_about.xml @@ -1,6 +1,5 @@ @@ -35,170 +34,125 @@ android:layout_marginBottom="30dp" android:textSize="18sp" /> - + android:orientation="vertical" + android:padding="10dp"> - + android:layout_height="match_parent" + android:text="@string/website" + android:textStyle="bold" /> - + - + - - - - - + android:orientation="vertical" + android:padding="10dp"> - + android:layout_height="match_parent" + android:text="@string/contributing" + android:textStyle="bold" /> - + - + - + - + - + + + + + android:orientation="vertical" + android:padding="10dp"> - + android:layout_height="match_parent" + android:text="@string/donate" + android:textStyle="bold" /> - + - + - - - - - + android:orientation="vertical" + android:padding="10dp"> - + android:layout_height="match_parent" + android:text="@string/license" + android:textStyle="bold" /> - + - + - - - - - + android:orientation="vertical" + android:padding="10dp"> - + android:layout_height="match_parent" + android:text="@string/update" + android:textStyle="bold" /> - + - - - - - + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 336ecb55a..72aabf7a4 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -142,4 +142,6 @@ Player, Downloads, History Live This comment has no replies. + Authors + Find out who\'s behind Team LibreTube and does the magic. \ No newline at end of file