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
fafaf8b3
Commit
fafaf8b3
authored
Oct 11, 2017
by
Leonardo Aramaki
Committed by
GitHub
Oct 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #500 from HarveyDoom/develop
[NEW] Display Keyboard when launching dialog
parents
38b8792c
caac8e2f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
AbstractAddRoomDialogFragment.java
...ragment/sidebar/dialog/AbstractAddRoomDialogFragment.java
+7
-0
AddChannelDialogFragment.java
...oid/fragment/sidebar/dialog/AddChannelDialogFragment.java
+5
-2
AddDirectMessageDialogFragment.java
...agment/sidebar/dialog/AddDirectMessageDialogFragment.java
+1
-0
No files found.
app/src/main/java/chat/rocket/android/fragment/sidebar/dialog/AbstractAddRoomDialogFragment.java
View file @
fafaf8b3
...
...
@@ -6,6 +6,7 @@ import android.support.annotation.LayoutRes;
import
android.support.annotation.NonNull
;
import
android.support.annotation.Nullable
;
import
android.view.View
;
import
android.view.WindowManager
;
import
android.widget.Toast
;
import
com.trello.rxlifecycle2.components.support.RxAppCompatDialogFragment
;
...
...
@@ -42,6 +43,12 @@ public abstract class AbstractAddRoomDialogFragment extends RxAppCompatDialogFra
methodCall
=
new
MethodCallHelper
(
getContext
(),
hostname
);
}
protected
void
requestFocus
(
View
view
)
{
if
(
view
.
requestFocus
())
{
getDialog
().
getWindow
().
setSoftInputMode
(
WindowManager
.
LayoutParams
.
SOFT_INPUT_STATE_ALWAYS_VISIBLE
);
}
}
@Override
public
final
void
setupDialog
(
Dialog
dialog
,
int
style
)
{
super
.
setupDialog
(
dialog
,
style
);
...
...
app/src/main/java/chat/rocket/android/fragment/sidebar/dialog/AddChannelDialogFragment.java
View file @
fafaf8b3
...
...
@@ -2,6 +2,7 @@ package chat.rocket.android.fragment.sidebar.dialog;
import
android.annotation.SuppressLint
;
import
android.os.Bundle
;
import
android.support.design.widget.TextInputEditText
;
import
android.view.View
;
import
android.widget.CompoundButton
;
import
android.widget.TextView
;
...
...
@@ -39,8 +40,9 @@ public class AddChannelDialogFragment extends AbstractAddRoomDialogFragment {
@Override
protected
void
onSetupDialog
()
{
View
buttonAddChannel
=
getDialog
().
findViewById
(
R
.
id
.
btn_add_channel
);
TextInputEditText
channelNameText
=
(
TextInputEditText
)
getDialog
().
findViewById
(
R
.
id
.
editor_channel_name
);
RxTextView
.
textChanges
((
TextView
)
getDialog
().
findViewById
(
R
.
id
.
editor_channel_name
)
)
RxTextView
.
textChanges
((
TextView
)
channelNameText
)
.
map
(
text
->
!
TextUtils
.
isEmpty
(
text
))
.
compose
(
bindToLifecycle
())
.
subscribe
(
...
...
@@ -49,6 +51,7 @@ public class AddChannelDialogFragment extends AbstractAddRoomDialogFragment {
);
buttonAddChannel
.
setOnClickListener
(
view
->
createRoom
());
requestFocus
(
channelNameText
);
}
private
boolean
isChecked
(
int
viewId
)
{
...
...
app/src/main/java/chat/rocket/android/fragment/sidebar/dialog/AddDirectMessageDialogFragment.java
View file @
fafaf8b3
...
...
@@ -80,6 +80,7 @@ public class AddDirectMessageDialogFragment extends AbstractAddRoomDialogFragmen
);
buttonAddDirectMessage
.
setOnClickListener
(
view
->
createRoom
());
requestFocus
(
autoCompleteTextView
);
}
private
void
setupView
(
Optional
<
RocketChatAbsoluteUrl
>
rocketChatAbsoluteUrlOptional
)
{
...
...
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