Add vcard to message

This commit is contained in:
moezbhatti
2018-12-25 22:44:47 -05:00
parent f6e07d9bc3
commit 14b2d2ef8b
11 changed files with 177 additions and 36 deletions
@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (C) 2017 Moez Bhatti <moez.bhatti@gmail.com>
~
~ This file is part of QKSMS.
~
~ QKSMS is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ (at your option) any later version.
~
~ QKSMS is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with QKSMS. If not, see <http://www.gnu.org/licenses/>.
-->
<FrameLayout 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="wrap_content"
android:layout_height="wrap_content"
tools:background="?attr/bubbleColor">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="56dp"
android:layout_marginStart="8dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="8dp"
android:background="@drawable/rounded_rectangle_outline_4dp"
android:backgroundTint="?android:attr/divider"
android:paddingEnd="8dp">
<ImageView
android:id="@+id/vCardAvatar"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="16dp"
android:src="@drawable/ic_person_black_24dp"
android:tint="?android:attr/textColorSecondary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:textColor="?android:attr/textColorPrimary"
app:layout_constraintBottom_toTopOf="@id/label"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/vCardAvatar"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
app:textSize="primary"
tools:text="@tools:sample/full_names" />
<com.moez.QKSMS.common.widget.QkTextView
android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/compose_vcard_label"
android:textColor="?android:attr/textColorTertiary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/vCardAvatar"
app:layout_constraintTop_toBottomOf="@id/name"
app:textSize="secondary" />
</androidx.constraintlayout.widget.ConstraintLayout>
<ImageView
android:id="@+id/detach"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_gravity="top|end"
android:layout_marginTop="10dp"
android:layout_marginEnd="2dp"
android:background="@drawable/circle"
android:backgroundTint="?attr/bubbleColor"
android:src="@drawable/ic_cancel_black_24dp"
android:tint="?android:attr/textColorSecondary" />
</FrameLayout>
@@ -255,7 +255,7 @@
app:layout_constraintBottom_toTopOf="@id/message"
app:layout_constraintEnd_toEndOf="@id/messageBackground"
app:layout_constraintStart_toStartOf="@id/messageBackground"
tools:listitem="@layout/attachment_list_item" />
tools:listitem="@layout/attachment_image_list_item" />
<com.moez.QKSMS.common.widget.QkEditText
android:id="@+id/message"