Welcome to mirror list, hosted at ThFree Co, Russian Federation.

rv_item_conversation_with_last_message.xml « layout « res « main « src « app - github.com/nextcloud/talk-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c13b8fe72d85d6b2a10244434c5c4c84599b8675 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version="1.0" encoding="utf-8"?><!--
  ~ Nextcloud Talk application
  ~
  ~ @author Mario Danic
  ~ @author Andy Scherzinger
  ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
  ~ Copyright (C) 2017-2018 Mario Danic <mario@lovelyhq.com>
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  ~
  ~
  ~
  ~ Adapted from https://github.com/stfalcon-studio/ChatKit/blob/master/chatkit/src/main/res/layout/item_dialog.xml
  -->

<RelativeLayout 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:layout_margin="@dimen/double_margin_between_elements">

    <FrameLayout
        android:id="@+id/dialogAvatarFrameLayout"
        android:layout_width="@dimen/small_item_height"
        android:layout_height="@dimen/small_item_height"
        android:layout_centerVertical="true"
        android:layout_marginEnd="@dimen/double_margin_between_elements">

        <ImageView
            android:id="@id/dialogAvatar"
            android:layout_width="@dimen/small_item_height"
            android:layout_height="@dimen/small_item_height"
            android:contentDescription="@null"
            app:roundAsCircle="true" />

        <ImageView
            android:id="@+id/favoriteConversationImageView"
            android:layout_width="16dp"
            android:layout_height="16dp"
            android:layout_gravity="top|end"
            android:contentDescription="@string/starred"
            android:src="@drawable/ic_star_black_24dp"
            app:tint="@color/favorite_icon_tint"
            app:tintMode="src_in" />

        <ImageView
            android:id="@+id/user_status_image"
            android:layout_width="18dp"
            android:layout_height="18dp"
            android:layout_gravity="bottom|end"
            android:contentDescription="@string/nc_account_chooser_active_user"
            tools:src="@drawable/emoji_one_category_smileysandpeople"/>
    </FrameLayout>

    <RelativeLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@id/dialogName"
        android:layout_marginTop="6dp"
        android:layout_toEndOf="@id/dialogAvatarFrameLayout">

        <androidx.emoji.widget.EmojiTextView
            android:id="@id/dialogLastMessage"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_centerVertical="true"
            android:layout_toStartOf="@id/dialogUnreadBubble"
            android:ellipsize="end"
            android:gravity="start|top"
            android:lines="1"
            android:singleLine="true"
            android:textAlignment="viewStart"
            android:textColor="@color/textColorMaxContrast"
            android:textSize="14sp"
            tools:text="This is the last message\nof an incredibly long two line  conversation text" />

        <com.google.android.material.chip.Chip
            android:id="@+id/dialogUnreadBubble"
            style="@style/Widget.MaterialComponents.Chip.Choice"
            android:layout_width="wrap_content"
            android:layout_height="18dp"
            android:layout_alignParentEnd="true"
            android:layout_marginStart="8dp"
            android:clickable="false"
            android:gravity="top"
            android:lines="1"
            android:textAppearance="@style/ChipUnreadMessagesTextAppearance"
            android:textColor="@color/conversation_unread_bubble_text"
            app:chipBackgroundColor="@color/conversation_unread_bubble"
            app:chipEndPadding="-1dp"
            app:chipMinTouchTargetSize="0dp"
            app:chipStartPadding="-3dp"
            app:ensureMinTouchTargetSize="false"
            tools:text="999+" />

    </RelativeLayout>

    <TextView
        android:id="@id/dialogDate"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_marginTop="2dp"
        android:ellipsize="end"
        android:maxLines="1"
        android:textAlignment="viewEnd"
        android:textColor="@color/textColorMaxContrast"
        android:textSize="14sp"
        tools:text="yesterday" />

    <androidx.emoji.widget.EmojiTextView
        android:id="@id/dialogName"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_alignTop="@id/dialogAvatarFrameLayout"
        android:layout_marginTop="2dp"
        android:layout_toStartOf="@id/dialogDate"
        android:layout_toEndOf="@id/dialogAvatarFrameLayout"
        android:ellipsize="end"
        android:includeFontPadding="false"
        android:maxLines="1"
        android:textAlignment="viewStart"
        android:textColor="@color/conversation_item_header"
        android:textSize="@dimen/two_line_primary_text_size"
        tools:text="Best conversation" />

</RelativeLayout>