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
d5ffd2a9
Commit
d5ffd2a9
authored
Mar 13, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes the sign up screen (to allow the remaining views to be visible when scrolling down)
parent
7b05adba
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
83 deletions
+86
-83
SignupFragment.kt
...rocket/android/authentication/signup/ui/SignupFragment.kt
+9
-6
hold.xml
app/src/main/res/anim/hold.xml
+1
-1
slide_up.xml
app/src/main/res/anim/slide_up.xml
+1
-1
fragment_authentication_log_in.xml
app/src/main/res/layout/fragment_authentication_log_in.xml
+0
-1
fragment_authentication_sign_up.xml
app/src/main/res/layout/fragment_authentication_sign_up.xml
+75
-74
No files found.
app/src/main/java/chat/rocket/android/authentication/signup/ui/SignupFragment.kt
View file @
d5ffd2a9
...
...
@@ -19,12 +19,15 @@ import javax.inject.Inject
class
SignupFragment
:
Fragment
(),
SignupView
{
@Inject
lateinit
var
presenter
:
SignupPresenter
private
val
layoutListener
=
ViewTreeObserver
.
OnGlobalLayoutListener
{
if
(
KeyboardHelper
.
isSoftKeyboardShown
(
constraint
_layout
.
rootView
))
{
text_new_user_agreement
.
setVisible
(
false
)
if
(
KeyboardHelper
.
isSoftKeyboardShown
(
relative
_layout
.
rootView
))
{
bottom_container
.
setVisible
(
false
)
}
else
{
text_new_user_agreement
.
setVisible
(
true
)
bottom_container
.
apply
{
postDelayed
({
setVisible
(
true
)
},
3
)
}
}
}
...
...
@@ -48,7 +51,7 @@ class SignupFragment : Fragment(), SignupView {
tintEditTextDrawableStart
()
}
constraint
_layout
.
viewTreeObserver
.
addOnGlobalLayoutListener
(
layoutListener
)
relative
_layout
.
viewTreeObserver
.
addOnGlobalLayoutListener
(
layoutListener
)
setUpNewUserAgreementListener
()
...
...
@@ -58,8 +61,8 @@ class SignupFragment : Fragment(), SignupView {
}
override
fun
onDestroyView
()
{
relative_layout
.
viewTreeObserver
.
removeOnGlobalLayoutListener
(
layoutListener
)
super
.
onDestroyView
()
constraint_layout
.
viewTreeObserver
.
removeOnGlobalLayoutListener
(
layoutListener
)
}
override
fun
alertBlankName
()
{
...
...
app/src/main/res/anim/hold.xml
View file @
d5ffd2a9
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<translate
android:duration=
"
8
00"
android:duration=
"
5
00"
android:fromYDelta=
"0.0%p"
android:toYDelta=
"0.0%p"
/>
</set>
\ No newline at end of file
app/src/main/res/anim/slide_up.xml
View file @
d5ffd2a9
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<translate
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:duration=
"
3
50"
android:duration=
"
2
50"
android:fromYDelta=
"100.0%"
android:toYDelta=
"0.0%"
/>
</set>
\ No newline at end of file
app/src/main/res/layout/fragment_authentication_log_in.xml
View file @
d5ffd2a9
...
...
@@ -9,7 +9,6 @@
tools:context=
".authentication.login.ui.LoginFragment"
>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/middle_container"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
...
...
app/src/main/res/layout/fragment_authentication_sign_up.xml
View file @
d5ffd2a9
<?xml version="1.0" encoding="utf-8"?>
<
android.support.constraint.Constraint
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<
Relative
Layout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/
constraint
_layout"
android:id=
"@+id/
relative
_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:focusableInTouchMode=
"true"
tools:context=
".authentication.signup.ui.SignupFragment"
>
<TextView
android:id=
"@+id/text_headline"
style=
"@style/Authentication.Headline.TextView"
android:text=
"@string/title_sign_up"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
<ScrollView
android:id=
"@+id/scroll_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<EditText
android:id=
"@+id/text_name"
style=
"@style/Authentication.EditText"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_person_black_24dp"
android:hint=
"@string/msg_name"
android:imeOptions=
"actionNext"
android:inputType=
"textCapWords"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/text_headline"
/>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<EditText
android:id=
"@+id/text_username"
style=
"@style/Authentication.EditText"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_at_black_24dp"
android:hint=
"@string/msg_username"
android:imeOptions=
"actionNext"
android:inputType=
"text"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/text_name"
/>
<TextView
android:id=
"@+id/text_headline"
style=
"@style/Authentication.Headline.TextView"
android:layout_gravity=
"center"
android:text=
"@string/title_sign_up"
/>
<EditText
android:id=
"@+id/text_password"
style=
"@style/Authentication.EditText"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_lock_black_24dp"
android:hint=
"@string/msg_password"
android:imeOptions=
"actionNext"
android:inputType=
"textPassword"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/text_username"
/>
<EditText
android:id=
"@+id/text_name"
style=
"@style/Authentication.EditText"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_person_black_24dp"
android:hint=
"@string/msg_name"
android:imeOptions=
"actionNext"
android:inputType=
"textCapWords"
/>
<EditText
android:id=
"@+id/text_email"
style=
"@style/Authentication.EditText"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_email_black_24dp"
android:hint=
"@string/msg_email"
android:imeOptions=
"actionDone"
android:inputType=
"textEmailAddress"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/text_password"
/>
<EditText
android:id=
"@+id/text_username"
style=
"@style/Authentication.EditText"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_at_black_24dp"
android:hint=
"@string/msg_username"
android:imeOptions=
"actionNext"
android:inputType=
"text"
/>
<EditText
android:id=
"@+id/text_password"
style=
"@style/Authentication.EditText"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_lock_black_24dp"
android:hint=
"@string/msg_password"
android:imeOptions=
"actionNext"
android:inputType=
"textPassword"
/>
<EditText
android:id=
"@+id/text_email"
style=
"@style/Authentication.EditText"
android:layout_marginBottom=
"16dp"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_email_black_24dp"
android:hint=
"@string/msg_email"
android:imeOptions=
"actionDone"
android:inputType=
"textEmailAddress"
/>
</LinearLayout>
</ScrollView>
<com.wang.avi.AVLoadingIndicatorView
android:id=
"@+id/view_loading"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_centerInParent=
"true"
android:layout_below=
"@id/scroll_view"
android:layout_centerHorizontal=
"true"
android:layout_marginTop=
"16dp"
android:visibility=
"gone"
app:indicatorName=
"BallPulseIndicator"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/text_email"
tools:visibility=
"visible"
/>
<
TextView
android:id=
"@+id/
text_new_user_agreement
"
android:layout_width=
"
wrap_cont
ent"
<
LinearLayout
android:id=
"@+id/
bottom_container
"
android:layout_width=
"
match_par
ent"
android:layout_height=
"wrap_content"
android:layout_marginBottom=
"16dp"
android:layout_marginEnd=
"@dimen/screen_edge_left_and_right_margins"
android:layout_marginStart=
"@dimen/screen_edge_left_and_right_margins"
android:gravity=
"center"
android:textColorLink=
"@color/colorAccent"
app:layout_constraintBottom_toTopOf=
"@+id/button_sign_up"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
android:layout_alignParentBottom=
"true"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/text_new_user_agreement"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:layout_margin=
"@dimen/screen_edge_left_and_right_margins"
android:gravity=
"center"
android:textColorLink=
"@color/colorAccent"
/>
<Button
android:id=
"@+id/button_sign_up"
style=
"@style/Authentication.Button"
android:text=
"@string/title_sign_up"
app:layout_constraintBottom_toBottomOf=
"parent"
/
>
<Button
android:id=
"@+id/button_sign_up"
style=
"@style/Authentication.Button"
android:text=
"@string/title_sign_up"
/>
</LinearLayout
>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
</RelativeLayout>
\ 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