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
aca857cf
Commit
aca857cf
authored
Jul 13, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update layout, java classes and string.xml
parent
78db7fe9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
148 additions
and
129 deletions
+148
-129
InputHostnameFragment.java
...et/android/fragment/add_server/InputHostnameFragment.java
+1
-1
LoginFragment.java
.../rocket/android/fragment/server_config/LoginFragment.java
+11
-9
fragment_input_hostname.xml
app/src/main/res/layout/fragment_input_hostname.xml
+20
-13
fragment_login.xml
app/src/main/res/layout/fragment_login.xml
+113
-106
strings.xml
app/src/main/res/values/strings.xml
+3
-0
No files found.
app/src/main/java/chat/rocket/android/fragment/add_server/InputHostnameFragment.java
View file @
aca857cf
...
...
@@ -43,7 +43,7 @@ public class InputHostnameFragment extends AbstractFragment implements InputHost
protected
void
onSetupView
()
{
setupVersionInfo
();
container
=
(
ConstraintLayout
)
rootView
.
findViewById
(
R
.
id
.
container
);
container
=
rootView
.
findViewById
(
R
.
id
.
container
);
waitingView
=
rootView
.
findViewById
(
R
.
id
.
waiting
);
rootView
.
findViewById
(
R
.
id
.
btn_connect
).
setOnClickListener
(
view
->
handleConnect
());
}
...
...
app/src/main/java/chat/rocket/android/fragment/server_config/LoginFragment.java
View file @
aca857cf
...
...
@@ -6,6 +6,7 @@ import android.support.constraint.ConstraintLayout;
import
android.support.design.widget.Snackbar
;
import
android.support.v4.app.Fragment
;
import
android.view.View
;
import
android.widget.Button
;
import
android.widget.TextView
;
import
java.util.HashMap
;
...
...
@@ -47,18 +48,19 @@ public class LoginFragment extends AbstractServerConfigFragment implements Login
@Override
protected
void
onSetupView
()
{
container
=
(
ConstraintLayout
)
rootView
.
findViewById
(
R
.
id
.
container
);
container
=
rootView
.
findViewById
(
R
.
id
.
container
);
View
btnEmail
=
rootView
.
findViewById
(
R
.
id
.
btn_login_with_email
);
txtUsername
=
(
TextView
)
rootView
.
findViewById
(
R
.
id
.
editor_username
);
txtPasswd
=
(
TextView
)
rootView
.
findViewById
(
R
.
id
.
editor_passwd
);
Button
btnEmail
=
rootView
.
findViewById
(
R
.
id
.
btn_login_with_email
);
Button
btnUserRegistration
=
rootView
.
findViewById
(
R
.
id
.
btn_user_registration
);
txtUsername
=
rootView
.
findViewById
(
R
.
id
.
editor_username
);
txtPasswd
=
rootView
.
findViewById
(
R
.
id
.
editor_passwd
);
waitingView
=
rootView
.
findViewById
(
R
.
id
.
waiting
);
btnEmail
.
setOnClickListener
(
view
->
presenter
.
login
(
txtUsername
.
getText
().
toString
(),
txtPasswd
.
getText
().
toString
()));
final
View
btnUserRegistration
=
rootView
.
findViewById
(
R
.
id
.
btn_user_registration
);
btnUserRegistration
.
setOnClickListener
(
view
->
UserRegistrationDialogFragment
.
create
(
hostname
,
txtUsername
.
getText
().
toString
(),
txtPasswd
.
getText
().
toString
())
btnEmail
.
setOnClickListener
(
view
->
presenter
.
login
(
txtUsername
.
getText
().
toString
(),
txtPasswd
.
getText
().
toString
()));
btnUserRegistration
.
setOnClickListener
(
view
->
UserRegistrationDialogFragment
.
create
(
hostname
,
txtUsername
.
getText
().
toString
(),
txtPasswd
.
getText
().
toString
())
.
show
(
getFragmentManager
(),
"UserRegistrationDialogFragment"
));
}
...
...
app/src/main/res/layout/fragment_input_hostname.xml
View file @
aca857cf
...
...
@@ -11,9 +11,14 @@
<android.support.constraint.ConstraintLayout
android:id=
"@+id/container"
android:layout_width=
"wrap_content"
android:minWidth=
"28
8
dp"
android:minWidth=
"28
0
dp"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/margin_24"
android:paddingStart=
"@dimen/margin_16"
android:paddingLeft=
"@dimen/margin_16"
android:paddingEnd=
"@dimen/margin_16"
android:paddingRight=
"@dimen/margin_16"
android:paddingTop=
"@dimen/margin_16"
android:paddingBottom=
"@dimen/margin_8"
android:background=
"@drawable/container_bg"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"@+id/version_info"
...
...
@@ -36,25 +41,27 @@
android:id=
"@+id/editor_hostname"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/margin_8"
android:hint=
"@string/fragment_input_hostname_server_hint"
android:imeOptions=
"actionSend"
android:inputType=
"textWebEditText"
android:maxLines=
"1"
app:layout_constraintTop_toBottomOf=
"@+id/hostnameTextView"
app:layout_constraintBottom_to
BottomOf=
"paren
t"
app:layout_constraintBottom_to
TopOf=
"@+id/btn_connec
t"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_to
LeftOf=
"@+id/btn_connec
t"
/>
app:layout_constraintRight_to
RightOf=
"paren
t"
/>
<
android.support.design.widget.FloatingAction
Button
<Button
android:id=
"@+id/btn_connect"
android:layout_width=
"
wrap_content
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
app:elevation=
"2dp"
app:fabSize=
"mini"
app:srcCompat=
"@drawable/ic_arrow_forward_white_24dp"
app:layout_constraintBottom_toBottomOf=
"@+id/editor_hostname"
app:layout_constraintLeft_toRightOf=
"@+id/editor_hostname"
app:layout_constraintRight_toRightOf=
"parent"
/>
android:layout_marginTop=
"@dimen/margin_8"
android:text=
"@string/fragment_input_hostname_connect"
app:layout_constraintTop_toBottomOf=
"@+id/editor_hostname"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
style=
"@style/Widget.AppCompat.Button.Colored"
/>
</android.support.constraint.ConstraintLayout>
<chat.rocket.android.widget.WaitingView
...
...
@@ -63,7 +70,7 @@
android:layout_height=
"wrap_content"
android:visibility=
"gone"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"@id/version_info"
app:layout_constraintBottom_toTopOf=
"@
+
id/version_info"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
...
...
app/src/main/res/layout/fragment_login.xml
View file @
aca857cf
...
...
@@ -19,58 +19,67 @@
<android.support.constraint.ConstraintLayout
android:id=
"@+id/container"
android:layout_width=
"wrap_content"
android:minWidth=
"288
dp"
android:minWidth=
"280
dp"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/margin_16"
android:paddingStart=
"@dimen/margin_16"
android:paddingLeft=
"@dimen/margin_16"
android:paddingEnd=
"@dimen/margin_16"
android:paddingRight=
"@dimen/margin_16"
android:paddingTop=
"@dimen/margin_8"
android:paddingBottom=
"@dimen/margin_8"
android:background=
"@drawable/container_bg"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
>
<io.github.yusukeiwaki.android.widget.FontAwesom
eButton
<Imag
eButton
android:id=
"@+id/btn_login_with_twitter"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:text=
"@string/fa_twitter
"
android:textSize=
"16s
p"
android:scaleType=
"fitXY
"
app:srcCompat=
"@drawable/ic_button_twitter_24d
p"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"@+id/text_input_username"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@+id/btn_login_with_facebook"
/>
app:layout_constraintRight_toLeftOf=
"@+id/btn_login_with_facebook"
android:background=
"?attr/selectableItemBackgroundBorderless"
/>
<io.github.yusukeiwaki.android.widget.FontAwesom
eButton
<Imag
eButton
android:id=
"@+id/btn_login_with_facebook"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:text=
"@string/fa_facebook_official
"
android:textSize=
"16s
p"
android:scaleType=
"fitXY
"
app:srcCompat=
"@drawable/ic_button_facebook_24d
p"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"@+id/text_input_username"
app:layout_constraintLeft_toRightOf=
"@+id/btn_login_with_twitter"
app:layout_constraintRight_toLeftOf=
"@+id/btn_login_with_github"
/>
app:layout_constraintRight_toLeftOf=
"@+id/btn_login_with_github"
android:background=
"?attr/selectableItemBackgroundBorderless"
/>
<io.github.yusukeiwaki.android.widget.FontAwesom
eButton
<Imag
eButton
android:id=
"@+id/btn_login_with_github"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:text=
"@string/fa_github
"
android:textSize=
"16s
p"
android:scaleType=
"fitXY
"
app:srcCompat=
"@drawable/ic_button_github_24d
p"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"@+id/text_input_username"
app:layout_constraintLeft_toRightOf=
"@+id/btn_login_with_facebook"
app:layout_constraintRight_toLeftOf=
"@+id/btn_login_with_google"
/>
app:layout_constraintRight_toLeftOf=
"@+id/btn_login_with_google"
android:background=
"?attr/selectableItemBackgroundBorderless"
/>
<io.github.yusukeiwaki.android.widget.FontAwesom
eButton
<Imag
eButton
android:id=
"@+id/btn_login_with_google"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:text=
"@string/fa_google
"
android:textSize=
"16s
p"
android:scaleType=
"fitXY
"
app:srcCompat=
"@drawable/ic_button_google_24d
p"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"@+id/text_input_username"
app:layout_constraintLeft_toRightOf=
"@+id/btn_login_with_github"
app:layout_constraintRight_toRightOf=
"parent"
/>
app:layout_constraintRight_toRightOf=
"parent"
android:background=
"?attr/selectableItemBackgroundBorderless"
/>
<android.support.design.widget.TextInputLayout
android:id=
"@+id/text_input_username"
...
...
@@ -95,7 +104,6 @@
android:id=
"@+id/text_input_passwd"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
app:passwordToggleEnabled=
"true"
app:layout_constraintTop_toBottomOf=
"@+id/text_input_username"
app:layout_constraintBottom_toTopOf=
"@+id/btn_user_registration"
app:layout_constraintLeft_toLeftOf=
"parent"
...
...
@@ -111,30 +119,29 @@
android:maxLines=
"1"
/>
</android.support.design.widget.TextInputLayout>
<android.support.design.widget.FloatingAction
Button
<
Button
android:id=
"@+id/btn_user_registration"
android:layout_width=
"wrap_content
"
android:layout_width=
"0dp
"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/margin_16"
app:backgroundTint=
"@color/white"
app:elevation=
"2dp"
app:fabSize=
"mini"
app:srcCompat=
"@drawable/ic_user_registration_blue_24dp"
android:layout_marginTop=
"@dimen/margin_8"
android:text=
"@string/fragment_login_sign_up"
app:layout_constraintTop_toBottomOf=
"@+id/text_input_passwd"
app:layout_constraintRight_toLeftOf=
"@+id/btn_login_with_email"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
app:layout_constraintBottom_toBottomOf=
"parent"
style=
"@style/Widget.AppCompat.Button.Colored"
/>
<android.support.design.widget.FloatingAction
Button
<
Button
android:id=
"@+id/btn_login_with_email"
android:layout_width=
"wrap_content
"
android:layout_width=
"0dp
"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/margin_16"
app:elevation=
"2dp"
app:fabSize=
"normal"
app:srcCompat=
"@drawable/ic_arrow_forward_white_24dp"
android:layout_marginTop=
"@dimen/margin_8"
android:text=
"@string/fragment_login_sign_in"
app:layout_constraintTop_toBottomOf=
"@+id/text_input_passwd"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
app:layout_constraintLeft_toRightOf=
"@+id/btn_user_registration"
app:layout_constraintBottom_toBottomOf=
"parent"
style=
"@style/Widget.AppCompat.Button.Colored"
/>
</android.support.constraint.ConstraintLayout>
</ScrollView>
...
...
app/src/main/res/values/strings.xml
View file @
aca857cf
...
...
@@ -32,8 +32,11 @@
<string
name=
"fragment_home_welcome_message"
>
Welcome to Rocket.Chat.Android\nSelect a channel from the drawer.
</string>
<string
name=
"fragment_input_hostname_hostname"
>
Hostname
</string>
<string
name=
"fragment_input_hostname_server_hint"
>
demo.rocket.chat
</string>
<string
name=
"fragment_input_hostname_connect"
>
CONNECT
</string>
<string
name=
"fragment_login_username_or_email"
>
Username or email
</string>
<string
name=
"fragment_login_password"
>
Password
</string>
<string
name=
"fragment_login_sign_up"
>
SIGN UP
</string>
<string
name=
"fragment_login_sign_in"
>
SIGN IN
</string>
<string
name=
"fragment_retry_login_retry_title"
>
RETRY
</string>
<string
name=
"fragment_retry_login_error_title"
>
Connection Error
</string>
<string
name=
"server_config_activity_authenticating"
>
Authenticating…
</string>
...
...
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