From 65a03fb2e9d34f9db03fe99a1d2f39d68f56a064 Mon Sep 17 00:00:00 2001 From: Harimurti Date: Fri, 15 May 2020 01:29:57 +0700 Subject: [PATCH] fix share chooser --- app/src/main/AndroidManifest.xml | 2 +- app/src/main/java/net/harimurti/babesharer/ShareActivity.kt | 5 ++++- app/src/main/res/layout/activity_share_full.xml | 2 +- app/src/main/res/layout/sample_layout_with.xml | 2 +- app/src/main/res/values-in/strings.xml | 4 +--- app/src/main/res/values/strings.xml | 4 +--- app/version.prop | 4 ++-- 7 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 1a3c6d9..9fd51af 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -20,7 +20,7 @@ android:theme="@style/AppTheme.Transparent" android:screenOrientation="portrait" tools:ignore="LockedOrientationActivity"> - + diff --git a/app/src/main/java/net/harimurti/babesharer/ShareActivity.kt b/app/src/main/java/net/harimurti/babesharer/ShareActivity.kt index c502754..589224e 100644 --- a/app/src/main/java/net/harimurti/babesharer/ShareActivity.kt +++ b/app/src/main/java/net/harimurti/babesharer/ShareActivity.kt @@ -147,8 +147,11 @@ class ShareActivity : AppCompatActivity() { } val shareIntent = Intent.createChooser(sendIntent, getString(R.string.title_share)) - runOnUiThread { startActivity(shareIntent) } + runOnUiThread { startActivityForResult(shareIntent, 0) } + } + override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + super.onActivityResult(requestCode, resultCode, data) this.finish() } } diff --git a/app/src/main/res/layout/activity_share_full.xml b/app/src/main/res/layout/activity_share_full.xml index 7da0a71..5777fdc 100644 --- a/app/src/main/res/layout/activity_share_full.xml +++ b/app/src/main/res/layout/activity_share_full.xml @@ -24,7 +24,7 @@ android:layout_gravity="center_vertical" android:layout_marginStart="20dp" android:layout_marginEnd="20dp" - android:text="@string/title_share_article" + android:text="@string/title_share" android:textAppearance="@style/TextAppearance.AppCompat.Medium" android:textColor="@color/color_primary" /> diff --git a/app/src/main/res/layout/sample_layout_with.xml b/app/src/main/res/layout/sample_layout_with.xml index ffc125e..febcad1 100644 --- a/app/src/main/res/layout/sample_layout_with.xml +++ b/app/src/main/res/layout/sample_layout_with.xml @@ -25,7 +25,7 @@ android:layout_gravity="center_vertical" android:layout_marginStart="5dp" android:layout_marginEnd="5dp" - android:text="@string/title_share_article" + android:text="@string/title_share" android:textColor="@color/color_primary" android:textSize="8sp" tools:ignore="SmallSp" /> diff --git a/app/src/main/res/values-in/strings.xml b/app/src/main/res/values-in/strings.xml index 49d4d20..6b69384 100644 --- a/app/src/main/res/values-in/strings.xml +++ b/app/src/main/res/values-in/strings.xml @@ -1,8 +1,6 @@ - Bagikan Artikel dari BABE - Bagikan - Bagikan Artikel + Bagikan Artikel Artikel : Tautan : Permintaan Gagal diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 2ec5123..f5d1f7d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,8 +1,6 @@ BABE Sharer - Share Original Article - Share - Share Article + Share Article Article : Link : Request Failure diff --git a/app/version.prop b/app/version.prop index 4e0e0ac..8e9eeeb 100644 --- a/app/version.prop +++ b/app/version.prop @@ -1,2 +1,2 @@ -#Thu May 14 21:40:48 ICT 2020 -VERSION_CODE=32 +#Fri May 15 01:27:57 ICT 2020 +VERSION_CODE=37