mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
show a list of contacts for managing favorites at FAB press
This commit is contained in:
11
app/src/main/res/layout/dialog_add_favorites.xml
Normal file
11
app/src/main/res/layout/dialog_add_favorites.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.simplemobiletools.commons.views.MyRecyclerView
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/add_favorites_list"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:paddingTop="@dimen/medium_margin"
|
||||
android:scrollbars="vertical"
|
||||
app:layoutManager="android.support.v7.widget.LinearLayoutManager"/>
|
63
app/src/main/res/layout/item_add_favorite_with_number.xml
Normal file
63
app/src/main/res/layout/item_add_favorite_with_number.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/contact_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/contact_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="@dimen/medium_margin">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_tmb"
|
||||
android:layout_width="@dimen/normal_icon_size"
|
||||
android:layout_height="@dimen/normal_icon_size"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_person"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contact_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignTop="@+id/contact_tmb"
|
||||
android:layout_toLeftOf="@+id/contact_checkbox"
|
||||
android:layout_toRightOf="@+id/contact_tmb"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingTop="@dimen/small_margin"
|
||||
android:textSize="@dimen/normal_text_size"
|
||||
tools:text="John Doe"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contact_number"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/contact_name"
|
||||
android:layout_toLeftOf="@+id/contact_checkbox"
|
||||
android:layout_toRightOf="@+id/contact_tmb"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:textSize="@dimen/normal_text_size"
|
||||
tools:text="0123 456 789"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/contact_checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/contact_tmb"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignTop="@+id/contact_tmb"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
52
app/src/main/res/layout/item_add_favorite_without_number.xml
Normal file
52
app/src/main/res/layout/item_add_favorite_without_number.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/contact_frame"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/contact_holder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingRight="@dimen/medium_margin">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/contact_tmb"
|
||||
android:layout_width="@dimen/normal_icon_size"
|
||||
android:layout_height="@dimen/normal_icon_size"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_person"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contact_name"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignBottom="@+id/contact_tmb"
|
||||
android:layout_alignTop="@+id/contact_tmb"
|
||||
android:layout_toLeftOf="@+id/contact_checkbox"
|
||||
android:layout_toRightOf="@+id/contact_tmb"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="@dimen/small_margin"
|
||||
android:paddingRight="@dimen/small_margin"
|
||||
android:paddingTop="@dimen/small_margin"
|
||||
android:textSize="@dimen/bigger_text_size"
|
||||
tools:text="John Doe"/>
|
||||
|
||||
<com.simplemobiletools.commons.views.MyAppCompatCheckbox
|
||||
android:id="@+id/contact_checkbox"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignBottom="@+id/contact_tmb"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignTop="@+id/contact_tmb"
|
||||
android:gravity="center_vertical"/>
|
||||
|
||||
</RelativeLayout>
|
||||
</FrameLayout>
|
Reference in New Issue
Block a user