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
09a9a63c
Commit
09a9a63c
authored
Mar 13, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes the keyboard shown when opening the member list view.
parent
44720ce0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+5
-0
MembersFragment.kt
...in/java/chat/rocket/android/members/ui/MembersFragment.kt
+0
-6
Ui.kt
app/src/main/java/chat/rocket/android/util/extensions/Ui.kt
+4
-2
No files found.
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
09a9a63c
...
...
@@ -133,6 +133,11 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiKeyboardListener, EmojiR
presenter
.
unsubscribeMessages
(
chatRoomId
)
handler
.
removeCallbacksAndMessages
(
null
)
unsubscribeTextMessage
()
// Hides the keyboard (it it' opened) before going to any view.
activity
?.
apply
{
hideKeyboard
()
}
super
.
onDestroyView
()
}
...
...
app/src/main/java/chat/rocket/android/members/ui/MembersFragment.kt
View file @
09a9a63c
...
...
@@ -15,7 +15,6 @@ import chat.rocket.android.members.adapter.MembersAdapter
import
chat.rocket.android.members.presentation.MembersPresenter
import
chat.rocket.android.members.presentation.MembersView
import
chat.rocket.android.members.viewmodel.MemberViewModel
import
chat.rocket.android.util.extensions.hideKeyboard
import
chat.rocket.android.util.extensions.inflate
import
chat.rocket.android.util.extensions.setVisible
import
chat.rocket.android.util.extensions.showToast
...
...
@@ -23,9 +22,6 @@ import chat.rocket.android.widget.DividerItemDecoration
import
dagger.android.support.AndroidSupportInjection
import
kotlinx.android.synthetic.main.fragment_members.*
import
javax.inject.Inject
import
android.view.inputmethod.InputMethodManager.HIDE_IMPLICIT_ONLY
import
android.app.Activity
import
android.view.inputmethod.InputMethodManager
fun
newInstance
(
chatRoomId
:
String
,
chatRoomType
:
String
):
Fragment
{
...
...
@@ -65,8 +61,6 @@ class MembersFragment : Fragment(), MembersView {
override
fun
onViewCreated
(
view
:
View
,
savedInstanceState
:
Bundle
?)
{
super
.
onViewCreated
(
view
,
savedInstanceState
)
val
imm
=
activity
?.
getSystemService
(
Activity
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
.
toggleSoftInput
(
InputMethodManager
.
HIDE_IMPLICIT_ONLY
,
0
)
(
activity
as
AppCompatActivity
).
supportActionBar
?.
title
=
""
...
...
app/src/main/java/chat/rocket/android/util/extensions/Ui.kt
View file @
09a9a63c
...
...
@@ -46,8 +46,10 @@ fun AppCompatActivity.addFragmentBackStack(tag: String, layoutId: Int, newInstan
}
fun
Activity
.
hideKeyboard
()
{
if
(
currentFocus
!=
null
)
{
val
imm
=
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
)
as
InputMethodManager
imm
.
hideSoftInputFromWindow
(
currentFocus
.
windowToken
,
InputMethodManager
.
RESULT_UNCHANGED_SHOWN
)
}
}
fun
Activity
.
showToast
(
@StringRes
resource
:
Int
,
duration
:
Int
=
Toast
.
LENGTH_SHORT
)
=
showToast
(
getString
(
resource
),
duration
)
...
...
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