single contact selection

This commit is contained in:
Jake McGinty
2014-02-13 01:35:08 -08:00
parent 9438973eac
commit 9b41675f8f
14 changed files with 576 additions and 50 deletions

View File

@@ -17,15 +17,16 @@
android:layout_height="106dp"
android:orientation="horizontal"
android:gravity="center_vertical"
android:paddingLeft="18dp"
android:paddingLeft="14dp"
android:paddingRight="18dp"
android:paddingTop="18dp">
android:paddingTop="14dp">
<ImageView
android:id="@+id/avatar"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_marginRight="10dp"
android:background="@drawable/thin_border"
android:src="@drawable/icon"/>
<EditText
@@ -33,7 +34,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:hint="Group name"
android:hint="@string/GroupCreateActivity_group_name_hint"
android:layout_gravity="center_vertical" />
</LinearLayout>
@@ -68,8 +69,9 @@
<RelativeLayout
android:id="@+id/push_disabled"
android:layout_width="fill_parent"
android:layout_height="106dp"
android:background="#dd555555"
android:layout_height="wrap_content"
android:minHeight="106dp"
android:background="#aa000000"
android:gravity="center_vertical|center_horizontal"
android:padding="15dp"
android:visibility="gone">
@@ -78,11 +80,11 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:background="#ff444444"
android:background="#dd222222"
android:textColor="#ffeeeeee"
android:fontFamily="sans-serif-light"
android:padding="8dp"
android:textSize="16dp"
android:textSize="16sp"
android:text="@string/GroupCreateActivity_contacts_dont_support_push" />
</RelativeLayout>
@@ -91,7 +93,9 @@
<org.thoughtcrime.securesms.components.PushRecipientsPanel
android:id="@+id/recipients"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:paddingLeft="15dp"
android:paddingRight="15dp" />
<ListView
android:id="@+id/selected_contacts_list"

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:layout_gravity="center"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android">
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/contact_selection_list_fragment"
android:name="org.thoughtcrime.securesms.SingleContactSelectionListFragment">
</fragment>
</LinearLayout>

View File

@@ -0,0 +1,29 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical">
<EditText android:id="@+id/filter"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:hint="Type a name to filter..."
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:layout_marginTop="7dp"
android:layout_marginBottom="7dp" />
<ListView android:id="@android:id/list"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fastScrollEnabled="true" />
<TextView android:id="@android:id/empty"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|center_vertical"
android:layout_marginTop="15dp"
android:text="@string/contact_selection_group_activity__no_contacts"
android:textSize="20sp" />
</LinearLayout>

View File

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"
android:paddingRight="25dip">
<TextView android:id="@+id/label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:layout_marginBottom="8dip"
android:layout_marginTop="-8dip"
android:layout_marginLeft="14dip"
android:singleLine="true"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textStyle="bold"
android:visibility = "gone"
/>
<TextView android:id="@+id/number"
android:visibility = "visible"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dip"
android:layout_marginTop="-8dip"
android:layout_marginLeft="14dip"
android:layout_alignParentLeft="true"
android:layout_alignParentBottom="true"
android:singleLine="true"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceSmall"
android:fontFamily="sans-serif-light"
/>
<TextView android:id="@+id/name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@id/number"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_marginBottom="1dip"
android:layout_marginLeft="14dip"
android:checkMark="?android:attr/listChoiceIndicatorMultiple"
android:singleLine="true"
android:ellipsize="marquee"
android:gravity="center_vertical|left"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
</RelativeLayout>