|
| 1 | +<?xml version="1.0" encoding="utf-8"?><!-- |
| 2 | + ~ Business Source License 1.0 © 2017 FlowCrypt Limited ([email protected]). |
| 3 | + ~ Use limitations apply. See https://github.com/FlowCrypt/flowcrypt-android/blob/master/LICENSE |
| 4 | + ~ Contributors: DenBond7 |
| 5 | + --> |
| 6 | + |
| 7 | +<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" |
| 8 | + xmlns:app="http://schemas.android.com/apk/res-auto" |
| 9 | + xmlns:tools="http://schemas.android.com/tools" |
| 10 | + android:layout_width="@dimen/layout_width_attachment_item" |
| 11 | + android:layout_height="@dimen/layout_height_attachment_item" |
| 12 | + android:layout_marginBottom="@dimen/default_margin_small" |
| 13 | + android:layout_marginLeft="@dimen/default_margin_content" |
| 14 | + android:layout_marginRight="@dimen/default_margin_content" |
| 15 | + android:layout_marginTop="@dimen/default_margin_small" |
| 16 | + android:background="@color/aluminum"> |
| 17 | + |
| 18 | + <android.support.constraint.ConstraintLayout |
| 19 | + android:layout_width="match_parent" |
| 20 | + android:layout_height="match_parent" |
| 21 | + android:layout_gravity="center" |
| 22 | + android:background="?android:attr/selectableItemBackground" |
| 23 | + android:clickable="true" |
| 24 | + android:paddingLeft="@dimen/default_margin_content" |
| 25 | + android:paddingRight="@dimen/default_margin_content"> |
| 26 | + |
| 27 | + <ImageView |
| 28 | + android:id="@+id/imageViewAttachmentIcon" |
| 29 | + android:layout_width="wrap_content" |
| 30 | + android:layout_height="wrap_content" |
| 31 | + android:contentDescription="@string/attachment" |
| 32 | + app:layout_constraintBottom_toBottomOf="parent" |
| 33 | + app:layout_constraintLeft_toLeftOf="parent" |
| 34 | + app:layout_constraintTop_toTopOf="parent" |
| 35 | + app:srcCompat="@mipmap/ic_attachment" /> |
| 36 | + |
| 37 | + <TextView |
| 38 | + android:id="@+id/textViewAttchmentName" |
| 39 | + android:layout_width="0dp" |
| 40 | + android:layout_height="wrap_content" |
| 41 | + android:layout_marginEnd="@dimen/default_margin_content_small" |
| 42 | + android:layout_marginLeft="@dimen/default_margin_content_small" |
| 43 | + android:layout_marginRight="@dimen/default_margin_content_small" |
| 44 | + android:layout_marginStart="@dimen/default_margin_content_small" |
| 45 | + android:ellipsize="middle" |
| 46 | + android:maxLines="1" |
| 47 | + app:layout_constraintBottom_toBottomOf="@+id/imageViewAttachmentIcon" |
| 48 | + app:layout_constraintHorizontal_bias="0.0" |
| 49 | + app:layout_constraintLeft_toRightOf="@+id/imageViewAttachmentIcon" |
| 50 | + app:layout_constraintRight_toLeftOf="@+id/imageButtonDownloadAttachment" |
| 51 | + app:layout_constraintTop_toTopOf="@+id/imageViewAttachmentIcon" |
| 52 | + tools:text="Some very very very very very large file name.txt" /> |
| 53 | + |
| 54 | + <ImageButton |
| 55 | + android:id="@+id/imageButtonDownloadAttachment" |
| 56 | + android:layout_width="wrap_content" |
| 57 | + android:layout_height="wrap_content" |
| 58 | + android:background="?android:attr/selectableItemBackground" |
| 59 | + android:contentDescription="@string/download" |
| 60 | + app:layout_constraintBottom_toBottomOf="@+id/textViewAttchmentName" |
| 61 | + app:layout_constraintRight_toRightOf="parent" |
| 62 | + app:layout_constraintTop_toTopOf="@+id/textViewAttchmentName" |
| 63 | + app:srcCompat="@mipmap/ic_file_download" /> |
| 64 | + </android.support.constraint.ConstraintLayout> |
| 65 | +</android.support.v7.widget.CardView> |
| 66 | + |
0 commit comments