show the selected contacts at the top

This commit is contained in:
tibbi 2020-04-05 22:34:22 +02:00
parent 1b3c6d9dac
commit d15005bfd7
5 changed files with 69 additions and 2 deletions

View file

@ -0,0 +1,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size
android:width="@dimen/medium_margin"
android:height="0dp" />
</shape>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/normal_margin" />
<solid android:color="@color/activated_item_foreground" />
</shape>

View file

@ -4,17 +4,29 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/selected_contacts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/activity_margin"
android:divider="@drawable/empty_divider"
android:orientation="horizontal"
android:showDividers="middle"
android:visibility="gone" />
<com.simplemobiletools.commons.views.MyAutoCompleteTextView
android:id="@+id/new_message_to"
android:layout_width="match_parent"
android:layout_height="@dimen/normal_icon_size"
android:layout_below="@+id/selected_contacts"
android:layout_marginStart="@dimen/activity_margin"
android:layout_marginEnd="@dimen/activity_margin"
android:background="@android:color/transparent"
android:completionThreshold="2"
android:gravity="center_vertical"
android:hint="@string/send_to"
android:inputType="textCapWords" />
android:inputType="textCapWords"
android:textSize="@dimen/big_text_size" />
<View
android:id="@+id/message_divider"

View file

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/selected_contact_holder"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/item_selected_contact_background">
<TextView
android:id="@+id/selected_contact_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="@dimen/normal_margin"
android:paddingTop="@dimen/normal_margin"
android:paddingBottom="@dimen/normal_margin"
android:textSize="@dimen/bigger_text_size"
tools:text="John" />
<ImageView
android:id="@+id/selected_contact_remove"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/selected_contact_name"
android:layout_alignBottom="@id/selected_contact_name"
android:layout_toEndOf="@+id/selected_contact_name"
android:paddingStart="@dimen/medium_margin"
android:paddingEnd="@dimen/medium_margin"
android:src="@drawable/ic_cross_vector" />
</RelativeLayout>