AppDetailsFragment: Implement compatibility section using plexus

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-12-24 13:43:23 +07:00
parent 42ea3a8af9
commit 516af19172
11 changed files with 207 additions and 12 deletions

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M40,720Q49,613 105.5,523Q162,433 256,380L182,252Q176,243 179,233Q182,223 192,218Q200,213 210,216Q220,219 226,228L300,356Q386,320 480,320Q574,320 660,356L734,228Q740,219 750,216Q760,213 768,218Q778,223 781,233Q784,243 778,252L704,380Q798,433 854.5,523Q911,613 920,720L40,720ZM280,610Q301,610 315.5,595.5Q330,581 330,560Q330,539 315.5,524.5Q301,510 280,510Q259,510 244.5,524.5Q230,539 230,560Q230,581 244.5,595.5Q259,610 280,610ZM680,610Q701,610 715.5,595.5Q730,581 730,560Q730,539 715.5,524.5Q701,510 680,510Q659,510 644.5,524.5Q630,539 630,560Q630,581 644.5,595.5Q659,610 680,610Z"/>
</vector>

View File

@@ -103,6 +103,10 @@
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/view_app" />
<include
android:id="@+id/layout_details_compatibility"
layout="@layout/layout_details_compatibility" />
<include
android:id="@+id/layout_details_permissions"
layout="@layout/layout_details_permissions" />

View File

@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:divider="@drawable/divider"
android:orientation="vertical"
android:paddingStart="@dimen/padding_small"
android:paddingEnd="@dimen/padding_small"
android:showDividers="middle">
<com.aurora.store.view.custom.layouts.ActionHeaderLayout
android:id="@+id/header_compatibility"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:headerSubtitle="@string/plexus_powered"
app:headerTitle="@string/details_compatibility_title" />
<com.aurora.store.view.custom.layouts.DevInfoLayout
android:id="@+id/txt_gms_dependency"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:imgIcon="@drawable/ic_menu_about"
tools:txtSubtitle="@string/details_compatibility_gms_required_subtitle"
tools:txtTitle="@string/details_compatibility_gms_required_title" />
<LinearLayout
android:id="@+id/compatibility_status_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<com.aurora.store.view.custom.layouts.DevInfoLayout
android:id="@+id/txt_status_aosp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:imgIcon="@drawable/ic_android"
app:txtSubtitle="@string/plexus_progress"
app:txtTitle="@string/details_compatibility_no_gms" />
<com.aurora.store.view.custom.layouts.DevInfoLayout
android:id="@+id/txt_status_microG"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:imgIcon="@drawable/ic_android"
app:txtSubtitle="@string/plexus_progress"
app:txtTitle="@string/details_compatibility_microg" />
</LinearLayout>
</LinearLayout>

View File

@@ -474,4 +474,17 @@
<string name="action_unarchive">Unarchive</string>
<string name="unable_to_open">Unable to open app</string>
<string name="version_update" translatable="false"><xliff:g id="installed_version_name">%1$s</xliff:g> (<xliff:g id="installed_version_code">%2$d</xliff:g>) ➔ <xliff:g id="update_version_name">%3$s</xliff:g> (<xliff:g id="update_version_code">%4$d</xliff:g>)</string>
<string name="plexus_powered">Powered by Plexus</string>
<string name="plexus_progress">Checking compatibility…</string>
<string name="details_compatibility_title">Compatibility</string>
<string name="details_compatibility_gms_required_title">Requires Google Play Services</string>
<string name="details_compatibility_gms_required_subtitle">You may need to install Googles proprietary library or a FOSS reimplementation such as microG.</string>
<string name="details_compatibility_gms_not_required_title">Works without Google Play Services</string>
<string name="details_compatibility_gms_not_required_subtitle">This app works without Googles proprietary library. However, it may still require other third-party libraries to work properly.</string>
<string name="details_compatibility_microg">With microG Project</string>
<string name="details_compatibility_no_gms">Without Google Play Services</string>
<string name="details_compatibility_status_compatible">Compatible: Works without any issues</string>
<string name="details_compatibility_status_limited">Limited: Works with limited features</string>
<string name="details_compatibility_status_unsupported">Unsupported: Not functional</string>
<string name="details_compatibility_status_unknown">Unknown: Not checked yet</string>
</resources>