This commit is contained in:
Niels Andriesse
2020-01-16 15:15:08 +11:00
parent f4360bddc7
commit 5f1fe4da68
9 changed files with 103 additions and 77 deletions

View File

@@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.loki.MentionCandidateSelectionViewCell
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="52dp"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:gravity="center_vertical"
android:background="?attr/conversation_list_item_background">
<RelativeLayout
android:layout_width="36dp"
android:layout_height="38dp"
android:layout_marginTop="1dp">
<!-- The frame layout below is a workaround for an avatar image view bug -->
<FrameLayout
android:id="@+id/profilePictureImageViewContainer"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<org.thoughtcrime.securesms.components.AvatarImageView
android:id="@+id/profilePictureImageView"
android:layout_width="36dp"
android:layout_height="36dp"
android:layout_marginBottom="2dp" />
</FrameLayout>
<ImageView
android:id="@+id/moderatorIconImageView"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="1.5dp"
android:src="@drawable/icon_crown"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true" />
</RelativeLayout>
<TextView
android:id="@+id/displayNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
style="@style/Signal.Text.Body"
android:ellipsize="end" />
</org.thoughtcrime.securesms.loki.MentionCandidateSelectionViewCell>

View File

@@ -126,7 +126,26 @@
android:clipChildren="false"
android:clipToPadding="false">
<include layout="@layout/view_mention_candidate_selection" />
<LinearLayout
android:id="@+id/mentionCandidateSelectionViewContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:visibility="gone">
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/separator" />
<include layout="@layout/view_mention_candidate_selection" />
<View
android:layout_width="match_parent"
android:layout_height="1px"
android:background="@color/separator" />
</LinearLayout>
<FrameLayout
android:layout_width="match_parent"

View File

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.loki.redesign.views.MentionCandidateView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="44dp"
android:orientation="horizontal"
android:paddingStart="@dimen/medium_spacing"
android:paddingEnd="@dimen/medium_spacing"
android:gravity="center_vertical"
android:background="@drawable/mention_candidate_view_background">
<RelativeLayout
android:layout_width="26dp"
android:layout_height="32dp">
<org.thoughtcrime.securesms.loki.redesign.views.ProfilePictureView
android:id="@+id/profilePictureView"
android:layout_width="@dimen/very_small_profile_picture_size"
android:layout_height="@dimen/very_small_profile_picture_size"
android:layout_marginTop="3dp" />
<ImageView
android:id="@+id/moderatorIconImageView"
android:layout_width="16dp"
android:layout_height="16dp"
android:src="@drawable/icon_crown"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true" />
</RelativeLayout>
<TextView
android:id="@+id/displayNameTextView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/medium_spacing"
android:textSize="@dimen/small_font_size"
android:textColor="@color/text"
android:maxLines="1"
android:ellipsize="end" />
</org.thoughtcrime.securesms.loki.redesign.views.MentionCandidateView>

View File

@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.loki.MentionCandidateSelectionView
<org.thoughtcrime.securesms.loki.redesign.views.MentionCandidateSelectionView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/userSelectionView"
android:layout_width="match_parent"
android:layout_height="0dp"
android:paddingTop="6dp"
android:listSelector="@color/transparent" />