mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
This commit introduces an abstract `BaseContactListAdapter` which provides most of the adapter logic. The original `ContactListAdapter` extends it to show date and online status of the contacts. The new `ContactChooserAdapter` which is used for introductions extends the `ContactListAdapter` and adds logic for graying out contacts from different identities than the currently used one. A new `ContactSelectorAdapter` extends the `BaseContactListAdapter` and allows to select multiple contacts. It offers a method to return a collection of all selected `ContactId`s. This commit also sneaks in an animation when the 'Share Forum' button is clicked. Closes #292
86 lines
2.9 KiB
XML
86 lines
2.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout
|
|
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="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingTop="@dimen/listitem_horizontal_margin"
|
|
android:paddingBottom="@dimen/listitem_horizontal_margin"
|
|
android:background="?attr/selectableItemBackground"
|
|
>
|
|
|
|
<de.hdodenhof.circleimageview.CircleImageView
|
|
android:id="@+id/avatarView"
|
|
android:layout_width="@dimen/listitem_picture_size"
|
|
android:layout_height="@dimen/listitem_picture_size"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_alignParentStart="true"
|
|
android:layout_centerVertical="true"
|
|
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
|
|
android:layout_marginStart="@dimen/listitem_horizontal_margin"
|
|
android:transitionName="avatar"
|
|
app:civ_border_color="@color/briar_text_primary"
|
|
app:civ_border_width="@dimen/avatar_border_width"
|
|
tools:src="@drawable/ic_launcher"/>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/textViews"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:layout_centerVertical="true"
|
|
android:layout_marginLeft="@dimen/listitem_horizontal_margin"
|
|
android:layout_marginStart="@dimen/listitem_horizontal_margin"
|
|
android:layout_toLeftOf="@+id/bulbView"
|
|
android:layout_toRightOf="@+id/avatarView"
|
|
android:layout_toEndOf="@+id/avatarView">
|
|
|
|
<TextView
|
|
android:id="@+id/nameView"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:maxLines="2"
|
|
android:textColor="@android:color/primary_text_light"
|
|
android:textSize="@dimen/text_size_medium"
|
|
tools:text="This is a name of a contact"/>
|
|
|
|
<TextView
|
|
android:id="@+id/dateView"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@android:color/secondary_text_light"
|
|
android:textSize="@dimen/text_size_small"
|
|
tools:text="Dec 24"/>
|
|
|
|
<TextView
|
|
android:id="@+id/identityView"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textColor="@android:color/tertiary_text_light"
|
|
android:textSize="@dimen/text_size_tiny"
|
|
android:visibility="gone"
|
|
tools:text="My Identity"/>
|
|
|
|
</LinearLayout>
|
|
|
|
<ImageView
|
|
android:id="@+id/bulbView"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentEnd="true"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_centerVertical="true"
|
|
android:layout_marginRight="@dimen/listitem_horizontal_margin"
|
|
tools:src="@drawable/contact_connected"/>
|
|
|
|
</RelativeLayout>
|
|
|
|
<View style="@style/Divider.ContactList"/>
|
|
|
|
</LinearLayout> |