Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
1032d8e4
Commit
1032d8e4
authored
Dec 07, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds unread chat room name style.
parent
9639a92b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
RoomViewHolder.kt
...a/chat/rocket/android/chatrooms/adapter/RoomViewHolder.kt
+2
-0
styles.xml
app/src/main/res/values/styles.xml
+7
-2
No files found.
app/src/main/java/chat/rocket/android/chatrooms/adapter/RoomViewHolder.kt
View file @
1032d8e4
...
@@ -53,10 +53,12 @@ class RoomViewHolder(itemView: View, private val listener: (RoomUiModel) -> Unit
...
@@ -53,10 +53,12 @@ class RoomViewHolder(itemView: View, private val listener: (RoomUiModel) -> Unit
if
(
room
.
unread
==
null
)
text_total_unread_messages
.
text
=
"!"
if
(
room
.
unread
==
null
)
text_total_unread_messages
.
text
=
"!"
if
(
room
.
unread
!=
null
)
text_total_unread_messages
.
text
=
room
.
unread
if
(
room
.
unread
!=
null
)
text_total_unread_messages
.
text
=
room
.
unread
if
(
room
.
mentions
)
text_total_unread_messages
.
text
=
"@${room.unread}"
if
(
room
.
mentions
)
text_total_unread_messages
.
text
=
"@${room.unread}"
text_chat_name
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_ChatName_Unread_TextView
)
text_timestamp
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_Timestamp_Unread_TextView
)
text_timestamp
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_Timestamp_Unread_TextView
)
text_last_message
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_LastMessage_Unread_TextView
)
text_last_message
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_LastMessage_Unread_TextView
)
text_total_unread_messages
.
isVisible
=
true
text_total_unread_messages
.
isVisible
=
true
}
else
{
}
else
{
text_chat_name
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_ChatName_TextView
)
text_timestamp
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_Timestamp_TextView
)
text_timestamp
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_Timestamp_TextView
)
text_last_message
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_LastMessage_TextView
)
text_last_message
.
setTextAppearance
(
context
,
R
.
style
.
ChatList_LastMessage_TextView
)
text_total_unread_messages
.
isInvisible
=
true
text_total_unread_messages
.
isInvisible
=
true
...
...
app/src/main/res/values/styles.xml
View file @
1032d8e4
...
@@ -108,13 +108,18 @@
...
@@ -108,13 +108,18 @@
<!-- Chat list -->
<!-- Chat list -->
<style
name=
"ChatList.ChatName.TextView"
parent=
"TextAppearance.AppCompat.Title"
>
<style
name=
"ChatList.ChatName.TextView"
parent=
"TextAppearance.AppCompat.Title"
>
<item
name=
"android:textSize"
>
16sp
</item>
<item
name=
"android:textSize"
>
16sp
</item>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
<item
name=
"android:fontFamily"
>
sans-serif
-medium
</item>
<item
name=
"android:textStyle"
>
bold
</item>
<item
name=
"android:textStyle"
>
normal
</item>
<item
name=
"android:textColor"
>
@color/colorPrimary
</item>
<item
name=
"android:textColor"
>
@color/colorPrimary
</item>
<item
name=
"android:ellipsize"
>
end
</item>
<item
name=
"android:ellipsize"
>
end
</item>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:maxLines"
>
1
</item>
</style>
</style>
<style
name=
"ChatList.ChatName.Unread.TextView"
parent=
"ChatList.ChatName.TextView"
>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
<item
name=
"android:textStyle"
>
bold
</item>
</style>
<style
name=
"ChatList.LastMessage.TextView"
parent=
"TextAppearance.AppCompat.Title"
>
<style
name=
"ChatList.LastMessage.TextView"
parent=
"TextAppearance.AppCompat.Title"
>
<item
name=
"android:textSize"
>
14sp
</item>
<item
name=
"android:textSize"
>
14sp
</item>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment