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
42d65277
Commit
42d65277
authored
Mar 20, 2018
by
Divyanshu Bhargava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
No recent emoji msg shown in emoji picker
parent
62af887c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
CategoryPagerAdapter.kt
.../chat/rocket/android/widget/emoji/CategoryPagerAdapter.kt
+7
-0
emoji_category_layout.xml
app/src/main/res/layout/emoji_category_layout.xml
+10
-0
strings.xml
app/src/main/res/values/strings.xml
+3
-0
No files found.
app/src/main/java/chat/rocket/android/widget/emoji/CategoryPagerAdapter.kt
View file @
42d65277
...
...
@@ -24,11 +24,18 @@ class CategoryPagerAdapter(val listener: EmojiKeyboardListener) : PagerAdapter()
val
recycler
=
view
.
findViewById
(
R
.
id
.
emojiRecyclerView
)
as
RecyclerView
val
adapter
=
EmojiAdapter
(
layoutManager
.
spanCount
,
listener
)
val
category
=
EmojiCategory
.
values
().
get
(
position
)
val
tv_recent_emoji
:
TextView
=
view
.
findViewById
(
R
.
id
.
tv_recent_emoji
)
val
emojis
=
if
(
category
!=
EmojiCategory
.
RECENTS
)
{
EmojiRepository
.
getEmojisByCategory
(
category
)
}
else
{
EmojiRepository
.
getRecents
()
}
val
recentEmojiSize
=
EmojiRepository
.
getRecents
().
size
if
(
category
==
EmojiCategory
.
RECENTS
&&
recentEmojiSize
==
0
){
tv_recent_emoji
.
visibility
=
View
.
VISIBLE
}
else
{
tv_recent_emoji
.
visibility
=
View
.
GONE
}
adapter
.
addEmojis
(
emojis
)
recycler
.
layoutManager
=
layoutManager
recycler
.
itemAnimator
=
DefaultItemAnimator
()
...
...
app/src/main/res/layout/emoji_category_layout.xml
View file @
42d65277
...
...
@@ -15,4 +15,14 @@
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
android:id=
"@+id/tv_recent_emoji"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/msg_no_recent_emoji"
android:layout_gravity=
"center"
android:elevation=
"10dp"
android:textSize=
"16sp"
android:visibility=
"gone"
/>
</android.support.design.widget.CoordinatorLayout>
\ No newline at end of file
app/src/main/res/values/strings.xml
View file @
42d65277
...
...
@@ -116,4 +116,7 @@
<string
name=
"status_disconnecting"
>
disconnecting
</string>
<string
name=
"status_waiting"
>
connecting in %d seconds
</string>
<!-- Emoji message-->
<string
name=
"msg_no_recent_emoji"
>
No recent emoji
</string>
</resources>
\ No newline at end of file
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