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
045d7549
Commit
045d7549
authored
Feb 27, 2018
by
samer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed Layout for LoginFragment
parent
8bab94e9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
LoginFragment.kt
...t/rocket/android/authentication/login/ui/LoginFragment.kt
+16
-4
No files found.
app/src/main/java/chat/rocket/android/authentication/login/ui/LoginFragment.kt
View file @
045d7549
...
...
@@ -74,6 +74,12 @@ class LoginFragment : Fragment(), LoginView {
setupSignUpListener
()
}
override
fun
onViewStateRestored
(
savedInstanceState
:
Bundle
?)
{
super
.
onViewStateRestored
(
savedInstanceState
)
isSocialMediaNeeded
()
}
private
fun
showThreeSocialMethods
()
{
var
count
=
0
for
(
i
in
0
..
social_accounts_container
.
childCount
)
{
...
...
@@ -213,15 +219,21 @@ class LoginFragment : Fragment(), LoginView {
button_log_in
.
isEnabled
=
value
text_username_or_email
.
isEnabled
=
value
text_password
.
isEnabled
=
value
if
(!
isEditTextEmpty
())
{
showSignUpView
(
value
)
showOauthView
(
value
)
}
}
// Returns true if *all* EditTexts are empty.
private
fun
isEditTextEmpty
():
Boolean
=
text_username_or_email
.
textContent
.
isBlank
()
&&
text_password
.
textContent
.
isEmpty
()
private
fun
isSocialMediaNeeded
()
{
if
(!
isEditTextEmpty
())
{
showSignUpView
(
false
)
showOauthView
(
false
)
}
else
{
showSignUpView
(
true
)
showOauthView
(
true
)
}
}
private
fun
showRemainingSocialAccountsView
()
{
social_accounts_container
.
postDelayed
({
for
(
i
in
0
..
social_accounts_container
.
childCount
)
{
...
...
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