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

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

View File

@ -1,59 +1,69 @@
<?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"
android:layout_width="match_parent"
android:layout_height="72dp"
android:background="?android:attr/selectableItemBackground"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingStart="14dp"
android:paddingEnd="16dp">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/icon"
android:layout_width="44dp"
android:layout_height="44dp"
tools:ignore="ContentDescription" />
android:layout_marginHorizontal="10dp"
app:cardBackgroundColor="@null"
app:cardCornerRadius="12dp"
app:cardElevation="0dp"
app:strokeColor="@null"
app:strokeWidth="0dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginStart="14dp"
android:orientation="vertical">
android:layout_height="match_parent"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.google.android.material.imageview.ShapeableImageView
android:id="@+id/icon"
android:layout_width="44dp"
android:layout_height="44dp"
tools:ignore="ContentDescription" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
android:layout_gravity="center_vertical"
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
android:id="@+id/name"
android:layout_width="0dp"
android:id="@+id/summary"
android:layout_width="match_parent"
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" />
android:textSize="14sp" />
</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>
</com.google.android.material.card.MaterialCardView>