Add: Use Card for AppItem

Fix: Escape Apostrophi
Update: Rounded Corner for App Item
This commit is contained in:
LooKeR 2021-10-17 13:04:57 +05:30
parent 5da839e072
commit cc2650454a
5 changed files with 57 additions and 46 deletions

View File

@ -9,8 +9,8 @@ buildscript {
} }
dependencies { dependencies {
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:' + versions.kotlin
classpath 'com.android.tools.build:gradle:7.0.3' classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.31'
} }
} }
@ -125,6 +125,8 @@ dependencies {
implementation 'io.reactivex.rxjava3:rxjava:3.1.1' implementation 'io.reactivex.rxjava3:rxjava:3.1.1'
implementation 'io.reactivex.rxjava3:rxandroid:3.0.0' implementation 'io.reactivex.rxjava3:rxandroid:3.0.0'
implementation 'androidx.activity:activity-ktx:1.4.0-rc01' implementation 'androidx.activity:activity-ktx:1.4.0-rc01'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'com.fasterxml.jackson.core:jackson-core:2.13.0' implementation 'com.fasterxml.jackson.core:jackson-core:2.13.0'
implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2' implementation 'com.squareup.okhttp3:okhttp:5.0.0-alpha.2'
implementation 'com.github.topjohnwu.libsu:core:3.1.2' implementation 'com.github.topjohnwu.libsu:core:3.1.2'

View File

@ -229,7 +229,7 @@ abstract class ScreenActivity : FragmentActivity() {
if (!packageName.isNullOrEmpty()) { if (!packageName.isNullOrEmpty()) {
val fragment = currentFragment val fragment = currentFragment
if (fragment !is ProductFragment || fragment.packageName != packageName) { if (fragment !is ProductFragment || fragment.packageName != packageName) {
pushFragment(ProductFragment(packageName)) navigateProduct(packageName)
} }
} }
} }

View File

@ -33,7 +33,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="0dp"
android:layout_weight="1" android:layout_weight="1"
android:background="?android:attr/colorBackground" android:background="?android:attr/colorBackground" />
android:layout_marginHorizontal="10dp" />
</com.looker.droidify.widget.FragmentLinearLayout> </com.looker.droidify.widget.FragmentLinearLayout>

View File

@ -1,59 +1,69 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <com.google.android.material.card.MaterialCardView 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" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="72dp" android:layout_height="72dp"
android:background="?android:attr/selectableItemBackground" android:layout_marginHorizontal="10dp"
android:gravity="center_vertical" app:cardBackgroundColor="@null"
android:orientation="horizontal" app:cardCornerRadius="12dp"
android:paddingStart="14dp" app:cardElevation="0dp"
android:paddingEnd="16dp"> app:strokeColor="@null"
app:strokeWidth="0dp">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/icon"
android:layout_width="44dp"
android:layout_height="44dp"
tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="match_parent"
android:layout_gravity="center_vertical" android:gravity="center_vertical"
android:layout_marginStart="14dp" android:orientation="horizontal">
android:orientation="vertical">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/icon"
android:layout_width="44dp"
android:layout_height="44dp"
tools:ignore="ContentDescription" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical" android:layout_gravity="center_vertical"
android:orientation="horizontal"> android:layout_marginStart="14dp"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true"
android:textColor="?android:attr/textColor"
android:textSize="16sp" />
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="70dp"
android:singleLine="true" />
</LinearLayout>
<TextView <TextView
android:id="@+id/name" android:id="@+id/summary"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:singleLine="true" android:singleLine="true"
android:textColor="?android:attr/textColor" android:textColor="?android:attr/textColor"
android:textSize="16sp" /> android:textSize="14sp" />
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxWidth="70dp"
android:singleLine="true" />
</LinearLayout> </LinearLayout>
<TextView
android:id="@+id/summary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:singleLine="true"
android:textColor="?android:attr/textColor"
android:textSize="14sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </com.google.android.material.card.MaterialCardView>

View File

@ -12,7 +12,7 @@
<string name="application">Applicazioni</string> <string name="application">Applicazioni</string>
<string name="application_not_found">Applicazione non trovata</string> <string name="application_not_found">Applicazione non trovata</string>
<string name="author_email">Email autore</string> <string name="author_email">Email autore</string>
<string name="author_website">Sito web dell'autore</string> <string name="author_website">Sito web dell\'autore</string>
<string name="available">Disponibile</string> <string name="available">Disponibile</string>
<string name="bug_tracker">Bug tracker</string> <string name="bug_tracker">Bug tracker</string>
<string name="cancel">Annulla</string> <string name="cancel">Annulla</string>
@ -65,7 +65,7 @@
<string name="install">Installa</string> <string name="install">Installa</string>
<string name="install_types">Tipi di installazione</string> <string name="install_types">Tipi di installazione</string>
<string name="installed">Installato</string> <string name="installed">Installato</string>
<string name="integrity_check_error_DESC">Impossibile verificare l'integrità</string> <string name="integrity_check_error_DESC">Impossibile verificare l\'integrità</string>
<string name="invalid_address">Indirizzo non valido</string> <string name="invalid_address">Indirizzo non valido</string>
<string name="invalid_fingerprint_format">Fingerprint in un formato non valido</string> <string name="invalid_fingerprint_format">Fingerprint in un formato non valido</string>
<string name="invalid_metadata_error_DESC">Metadata non validi.</string> <string name="invalid_metadata_error_DESC">Metadata non validi.</string>
@ -124,7 +124,7 @@
applicazioni da repository senza firma.</string> applicazioni da repository senza firma.</string>
<string name="requires_FORMAT">Richiede %s</string> <string name="requires_FORMAT">Richiede %s</string>
<string name="root_permission">Installazione silenziosa</string> <string name="root_permission">Installazione silenziosa</string>
<string name="root_permission_description">Permetti i permessi Root per abilitare l'installazione silenziosa</string> <string name="root_permission_description">Permetti i permessi Root per abilitare l\'installazione silenziosa</string>
<string name="save">Salva</string> <string name="save">Salva</string>
<string name="saving_details">Salvataggio dettagli</string> <string name="saving_details">Salvataggio dettagli</string>
<string name="screenshots">Screenshots</string> <string name="screenshots">Screenshots</string>
@ -163,7 +163,7 @@
<string name="upstream_source_code_is_not_free">Codice sorgente aggiornato non libero</string> <string name="upstream_source_code_is_not_free">Codice sorgente aggiornato non libero</string>
<string name="username">Nome utente</string> <string name="username">Nome utente</string>
<string name="username_missing">Nome utente mancante</string> <string name="username_missing">Nome utente mancante</string>
<string name="validation_index_error_DESC">L'indice non può essere convalidato</string> <string name="validation_index_error_DESC">L\'indice non può essere convalidato</string>
<string name="version_FORMAT">Versione %s</string> <string name="version_FORMAT">Versione %s</string>
<string name="versions">Versioni</string> <string name="versions">Versioni</string>
<string name="waiting_to_start_download">In attesa di inizio del download</string> <string name="waiting_to_start_download">In attesa di inizio del download</string>