taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

list_item_product.xml (4080B)


      1 <?xml version="1.0" encoding="utf-8"?><!--
      2   ~ This file is part of GNU Taler
      3   ~ (C) 2020 Taler Systems S.A.
      4   ~
      5   ~ GNU Taler is free software; you can redistribute it and/or modify it under the
      6   ~ terms of the GNU General Public License as published by the Free Software
      7   ~ Foundation; either version 3, or (at your option) any later version.
      8   ~
      9   ~ GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY
     10   ~ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   ~ A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     12   ~
     13   ~ You should have received a copy of the GNU General Public License along with
     14   ~ GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15   -->
     16 
     17 <com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
     18     xmlns:app="http://schemas.android.com/apk/res-auto"
     19     xmlns:tools="http://schemas.android.com/tools"
     20     android:layout_width="match_parent"
     21     android:layout_height="wrap_content"
     22     android:layout_margin="4dp"
     23     android:clickable="true"
     24     android:focusable="true"
     25     app:cardUseCompatPadding="true">
     26 
     27     <androidx.constraintlayout.widget.ConstraintLayout
     28         android:layout_width="match_parent"
     29         android:layout_height="wrap_content"
     30         android:padding="8dp">
     31 
     32         <ImageView
     33             android:id="@+id/image"
     34             android:layout_width="64dp"
     35             android:layout_height="64dp"
     36             android:padding="10dp"
     37             android:contentDescription="@string/product_image"
     38             android:visibility="gone"
     39             app:layout_constraintTop_toTopOf="parent"
     40             app:layout_constraintStart_toStartOf="parent"
     41             app:layout_constraintEnd_toEndOf="parent"
     42             tools:visibility="visible"
     43             tools:src="@drawable/ic_launcher_background"/>
     44 
     45         <TextView
     46             android:id="@+id/name"
     47             android:layout_width="0dp"
     48             android:layout_height="wrap_content"
     49             android:textColor="?android:textColorPrimary"
     50             android:textStyle="bold"
     51             app:layout_constraintEnd_toEndOf="parent"
     52             app:layout_constraintStart_toStartOf="parent"
     53             app:layout_constraintTop_toBottomOf="@id/image"
     54             tools:text="Steak and two Eggs" />
     55 
     56         <TextView
     57             android:id="@+id/description"
     58             android:layout_width="0dp"
     59             android:layout_height="wrap_content"
     60             android:layout_marginTop="4dp"
     61             android:textColor="?android:textColorSecondary"
     62             android:visibility="gone"
     63             app:layout_constraintEnd_toEndOf="parent"
     64             app:layout_constraintStart_toStartOf="parent"
     65             app:layout_constraintTop_toBottomOf="@id/name"
     66             tools:text="Two eggs, potatoes, and steak"
     67             tools:visibility="visible" />
     68 
     69         <TextView
     70             android:id="@+id/price"
     71             android:layout_width="0dp"
     72             android:layout_height="wrap_content"
     73             android:layout_marginTop="8dp"
     74             android:textColor="?android:textColorSecondary"
     75             app:layout_constraintStart_toStartOf="parent"
     76             app:layout_constraintEnd_toEndOf="parent"
     77             app:layout_constraintTop_toBottomOf="@+id/description"
     78             tools:text="7.95" />
     79 
     80         <TextView
     81             android:id="@+id/unavailableLabel"
     82             android:layout_width="0dp"
     83             android:layout_height="wrap_content"
     84             android:layout_marginTop="4dp"
     85             android:text="@string/product_unavailable"
     86             android:textColor="?attr/colorError"
     87             android:textStyle="bold"
     88             android:visibility="gone"
     89             app:layout_constraintEnd_toEndOf="parent"
     90             app:layout_constraintStart_toStartOf="parent"
     91             app:layout_constraintTop_toBottomOf="@id/price"
     92             tools:visibility="visible" />
     93 
     94     </androidx.constraintlayout.widget.ConstraintLayout>
     95 
     96 </com.google.android.material.card.MaterialCardView>