AppLinksFragment: Bring back market.android.com support
Apparently tons of applications still use the outdated way to open the store Ref: - https://developer.android.com/distribute/marketing-tools/linking-to-google-play - https://www.androidauthority.com/android-market-google-play-different-787082/ Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/appCompatTextView2" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/playStoreLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/margin_normal"
|
||||
@@ -48,30 +49,30 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/appCompatTextView">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/line1"
|
||||
android:id="@+id/playStoreTitle"
|
||||
style="@style/AuroraTextStyle.Subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/btn_action"
|
||||
android:layout_toStartOf="@id/playStoreButton"
|
||||
android:text="@string/app_link_play_store"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/line2"
|
||||
android:id="@+id/playStoreDesc"
|
||||
style="@style/AuroraTextStyle.Line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/line1"
|
||||
android:layout_alignStart="@id/line1"
|
||||
android:layout_alignEnd="@id/line1"
|
||||
android:layout_below="@+id/playStoreTitle"
|
||||
android:layout_alignStart="@id/playStoreTitle"
|
||||
android:layout_alignEnd="@id/playStoreTitle"
|
||||
android:layout_marginTop="@dimen/margin_xxsmall"
|
||||
android:maxLines="5"
|
||||
android:text="@string/google_play_store_desc" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_action"
|
||||
style="@style/Widget.MaterialComponents.Button.TextButton.Dialog.Flush"
|
||||
android:id="@+id/playStoreButton"
|
||||
style="@style/Widget.Material3.Button.TextButton.Dialog.Flush"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
@@ -80,4 +81,48 @@
|
||||
android:text="@string/action_enable" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/marketLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/margin_normal"
|
||||
android:layout_marginVertical="@dimen/margin_large"
|
||||
android:background="@drawable/bg_outlined_padded"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/playStoreLayout">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/marketTitle"
|
||||
style="@style/AuroraTextStyle.Subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_toStartOf="@id/marketButton"
|
||||
android:text="@string/app_link_android_market"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/marketDesc"
|
||||
style="@style/AuroraTextStyle.Line1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/marketTitle"
|
||||
android:layout_alignStart="@id/marketTitle"
|
||||
android:layout_alignEnd="@id/marketTitle"
|
||||
android:layout_marginTop="@dimen/margin_xxsmall"
|
||||
android:maxLines="5"
|
||||
android:text="@string/android_market_desc" />
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/marketButton"
|
||||
style="@style/Widget.Material3.Button.TextButton.Dialog.Flush"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginStart="@dimen/margin_small"
|
||||
android:text="@string/action_enable" />
|
||||
</RelativeLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -315,6 +315,14 @@
|
||||
android:name="packageName"
|
||||
android:defaultValue=""
|
||||
app:argType="string" />
|
||||
<!-- Android Market (deprecated) -->
|
||||
<deepLink
|
||||
app:action="android.intent.action.VIEW"
|
||||
app:uri="market:///details?id={packageName}" />
|
||||
<deepLink
|
||||
app:action="android.intent.action.VIEW"
|
||||
app:uri="market.android.com/details?id={packageName}" />
|
||||
<!-- Google Play (formerly Android Market) -->
|
||||
<deepLink
|
||||
app:action="android.intent.action.VIEW"
|
||||
app:uri="play.google.com/store/apps/details?id={packageName}" />
|
||||
|
||||
@@ -378,4 +378,6 @@
|
||||
<string name="app_link_enabled">App link enabled!</string>
|
||||
<string name="app_link_play_store" translatable="false">play.google.com</string>
|
||||
<string name="google_play_store_desc">Google Play, also known as the Google Play Store and formerly Android Market.</string>
|
||||
</resources>
|
||||
<string name="app_link_android_market" translatable="false">market.android.com</string>
|
||||
<string name="android_market_desc">Android Market was an online store offering software applications designed for Android devices, retired in 2017.</string>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user