allow sharing the app in about

This commit is contained in:
Bnyro 2022-08-24 18:06:43 +02:00
parent 298023b702
commit 64af78dfaf
2 changed files with 14 additions and 2 deletions

View File

@ -30,6 +30,17 @@ class AboutActivity : BaseActivity() {
binding = ActivityAboutBinding.inflate(layoutInflater)
setContentView(binding.root)
binding.appIcon.setOnClickListener {
val sendIntent: Intent = Intent().apply {
action = Intent.ACTION_SEND
putExtra(Intent.EXTRA_TEXT, GITHUB_URL)
type = "text/plain"
}
val shareIntent = Intent.createChooser(sendIntent, null)
startActivity(shareIntent)
}
binding.website.setOnClickListener {
openLinkFromHref(WEBSITE_URL)
}

View File

@ -6,10 +6,11 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/appIcon"
android:layout_width="90dp"
android:layout_height="90dp"
android:layout_gravity="center"
@ -23,7 +24,7 @@
android:layout_gravity="center"
android:layout_marginTop="20dp"
android:layout_marginBottom="40dp"
android:text="LibreTube"
android:text="@string/app_name"
android:textSize="24sp"
android:textStyle="bold" />