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
2824b15b
Commit
2824b15b
authored
Jan 06, 2017
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add WaitingView on Login screen.
parent
1e92423d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
LoginFragment.java
.../rocket/android/fragment/server_config/LoginFragment.java
+3
-0
fragment_login.xml
app/src/main/res/layout/fragment_login.xml
+7
-0
No files found.
app/src/main/java/chat/rocket/android/fragment/server_config/LoginFragment.java
View file @
2824b15b
...
...
@@ -42,6 +42,7 @@ public class LoginFragment extends AbstractServerConfigFragment {
final
View
btnEmail
=
rootView
.
findViewById
(
R
.
id
.
btn_login_with_email
);
final
TextView
txtUsername
=
(
TextView
)
rootView
.
findViewById
(
R
.
id
.
editor_username
);
final
TextView
txtPasswd
=
(
TextView
)
rootView
.
findViewById
(
R
.
id
.
editor_passwd
);
final
View
waitingView
=
rootView
.
findViewById
(
R
.
id
.
waiting
);
btnEmail
.
setOnClickListener
(
view
->
{
final
CharSequence
username
=
txtUsername
.
getText
();
final
CharSequence
passwd
=
txtPasswd
.
getText
();
...
...
@@ -49,6 +50,7 @@ public class LoginFragment extends AbstractServerConfigFragment {
return
;
}
view
.
setEnabled
(
false
);
waitingView
.
setVisibility
(
View
.
VISIBLE
);
new
MethodCallHelper
(
getContext
(),
serverConfigId
)
.
loginWithEmail
(
username
.
toString
(),
passwd
.
toString
())
...
...
@@ -56,6 +58,7 @@ public class LoginFragment extends AbstractServerConfigFragment {
if
(
task
.
isFaulted
())
{
showError
(
task
.
getError
().
getMessage
());
view
.
setEnabled
(
true
);
waitingView
.
setVisibility
(
View
.
GONE
);
}
return
null
;
});
...
...
app/src/main/res/layout/fragment_login.xml
View file @
2824b15b
...
...
@@ -120,5 +120,12 @@
app:fabSize=
"normal"
app:srcCompat=
"@drawable/ic_arrow_forward_white_24dp"
/>
</FrameLayout>
<chat.rocket.android.widget.WaitingView
android:id=
"@+id/waiting"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:visibility=
"gone"
/>
</LinearLayout>
</FrameLayout>
\ 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