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
49e68750
Commit
49e68750
authored
Mar 21, 2018
by
Divyanshu Bhargava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
requested changes done
parent
42d65277
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
CategoryPagerAdapter.kt
.../chat/rocket/android/widget/emoji/CategoryPagerAdapter.kt
+4
-3
emoji_category_layout.xml
app/src/main/res/layout/emoji_category_layout.xml
+1
-1
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+3
-0
No files found.
app/src/main/java/chat/rocket/android/widget/emoji/CategoryPagerAdapter.kt
View file @
49e68750
...
@@ -9,6 +9,7 @@ import android.view.View
...
@@ -9,6 +9,7 @@ import android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.TextView
import
android.widget.TextView
import
chat.rocket.android.R
import
chat.rocket.android.R
import
chat.rocket.android.util.extensions.setVisible
import
java.util.*
import
java.util.*
class
CategoryPagerAdapter
(
val
listener
:
EmojiKeyboardListener
)
:
PagerAdapter
()
{
class
CategoryPagerAdapter
(
val
listener
:
EmojiKeyboardListener
)
:
PagerAdapter
()
{
...
@@ -24,7 +25,7 @@ class CategoryPagerAdapter(val listener: EmojiKeyboardListener) : PagerAdapter()
...
@@ -24,7 +25,7 @@ class CategoryPagerAdapter(val listener: EmojiKeyboardListener) : PagerAdapter()
val
recycler
=
view
.
findViewById
(
R
.
id
.
emojiRecyclerView
)
as
RecyclerView
val
recycler
=
view
.
findViewById
(
R
.
id
.
emojiRecyclerView
)
as
RecyclerView
val
adapter
=
EmojiAdapter
(
layoutManager
.
spanCount
,
listener
)
val
adapter
=
EmojiAdapter
(
layoutManager
.
spanCount
,
listener
)
val
category
=
EmojiCategory
.
values
().
get
(
position
)
val
category
=
EmojiCategory
.
values
().
get
(
position
)
val
t
v_recent_emoji
:
TextView
=
view
.
findViewById
(
R
.
id
.
tv
_recent_emoji
)
val
t
ext_no_recent_emoji
:
TextView
=
view
.
findViewById
(
R
.
id
.
text_no
_recent_emoji
)
val
emojis
=
if
(
category
!=
EmojiCategory
.
RECENTS
)
{
val
emojis
=
if
(
category
!=
EmojiCategory
.
RECENTS
)
{
EmojiRepository
.
getEmojisByCategory
(
category
)
EmojiRepository
.
getEmojisByCategory
(
category
)
}
else
{
}
else
{
...
@@ -32,9 +33,9 @@ class CategoryPagerAdapter(val listener: EmojiKeyboardListener) : PagerAdapter()
...
@@ -32,9 +33,9 @@ class CategoryPagerAdapter(val listener: EmojiKeyboardListener) : PagerAdapter()
}
}
val
recentEmojiSize
=
EmojiRepository
.
getRecents
().
size
val
recentEmojiSize
=
EmojiRepository
.
getRecents
().
size
if
(
category
==
EmojiCategory
.
RECENTS
&&
recentEmojiSize
==
0
){
if
(
category
==
EmojiCategory
.
RECENTS
&&
recentEmojiSize
==
0
){
t
v_recent_emoji
.
visibility
=
View
.
VISIBLE
t
ext_no_recent_emoji
.
setVisible
(
true
)
}
else
{
}
else
{
t
v_recent_emoji
.
visibility
=
View
.
GONE
t
ext_no_recent_emoji
.
setVisible
(
false
)
}
}
adapter
.
addEmojis
(
emojis
)
adapter
.
addEmojis
(
emojis
)
recycler
.
layoutManager
=
layoutManager
recycler
.
layoutManager
=
layoutManager
...
...
app/src/main/res/layout/emoji_category_layout.xml
View file @
49e68750
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
app:layout_constraintTop_toTopOf=
"parent"
/>
app:layout_constraintTop_toTopOf=
"parent"
/>
<TextView
<TextView
android:id=
"@+id/t
v
_recent_emoji"
android:id=
"@+id/t
ext_no
_recent_emoji"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/msg_no_recent_emoji"
android:text=
"@string/msg_no_recent_emoji"
...
...
app/src/main/res/values-pt-rBR/strings.xml
View file @
49e68750
...
@@ -114,4 +114,7 @@
...
@@ -114,4 +114,7 @@
<string
name=
"status_authenticating"
>
autenticando
</string>
<string
name=
"status_authenticating"
>
autenticando
</string>
<string
name=
"status_disconnecting"
>
desconectando
</string>
<string
name=
"status_disconnecting"
>
desconectando
</string>
<string
name=
"status_waiting"
>
conectando em %d segundos
</string>
<string
name=
"status_waiting"
>
conectando em %d segundos
</string>
<!-- Emoji message-->
<string
name=
"msg_no_recent_emoji"
>
Nenhum emoji recente
</string>
</resources>
</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