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
9aa71d49
Commit
9aa71d49
authored
Jul 07, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update layouts
parent
9a9f0c75
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
239 additions
and
216 deletions
+239
-216
InputHostnameFragment.java
...et/android/fragment/add_server/InputHostnameFragment.java
+7
-8
LoginFragment.java
.../rocket/android/fragment/server_config/LoginFragment.java
+7
-5
container_bg.xml
app/src/main/res/drawable/container_bg.xml
+5
-0
fragment_input_hostname.xml
app/src/main/res/layout/fragment_input_hostname.xml
+72
-72
fragment_login.xml
app/src/main/res/layout/fragment_login.xml
+148
-131
No files found.
app/src/main/java/chat/rocket/android/fragment/add_server/InputHostnameFragment.java
View file @
9aa71d49
...
...
@@ -3,10 +3,10 @@ package chat.rocket.android.fragment.add_server;
import
android.content.Context
;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.constraint.ConstraintLayout
;
import
android.support.design.widget.Snackbar
;
import
android.view.View
;
import
android.widget.TextView
;
import
chat.rocket.android.BuildConfig
;
import
chat.rocket.android.LaunchUtil
;
import
chat.rocket.android.R
;
...
...
@@ -21,6 +21,7 @@ import chat.rocket.android.service.ConnectivityManager;
public
class
InputHostnameFragment
extends
AbstractFragment
implements
InputHostnameContract
.
View
{
private
InputHostnameContract
.
Presenter
presenter
;
private
ConstraintLayout
container
;
private
View
waitingView
;
public
InputHostnameFragment
()
{}
...
...
@@ -29,11 +30,8 @@ public class InputHostnameFragment extends AbstractFragment implements InputHost
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
final
Context
appContext
=
getContext
().
getApplicationContext
();
presenter
=
new
InputHostnamePresenter
(
new
RocketChatCache
(
appContext
),
ConnectivityManager
.
getInstance
(
appContext
));
Context
appContext
=
getContext
().
getApplicationContext
();
presenter
=
new
InputHostnamePresenter
(
new
RocketChatCache
(
appContext
),
ConnectivityManager
.
getInstance
(
appContext
));
}
@Override
...
...
@@ -45,6 +43,7 @@ public class InputHostnameFragment extends AbstractFragment implements InputHost
protected
void
onSetupView
()
{
setupVersionInfo
();
container
=
(
ConstraintLayout
)
rootView
.
findViewById
(
R
.
id
.
container
);
waitingView
=
rootView
.
findViewById
(
R
.
id
.
waiting
);
rootView
.
findViewById
(
R
.
id
.
btn_connect
).
setOnClickListener
(
view
->
handleConnect
());
}
...
...
@@ -82,14 +81,14 @@ public class InputHostnameFragment extends AbstractFragment implements InputHost
@Override
public
void
showLoader
()
{
rootView
.
findViewById
(
R
.
id
.
btn_connect
).
setEnabled
(
false
);
container
.
setVisibility
(
View
.
GONE
);
waitingView
.
setVisibility
(
View
.
VISIBLE
);
}
@Override
public
void
hideLoader
()
{
rootView
.
findViewById
(
R
.
id
.
btn_connect
).
setEnabled
(
true
);
waitingView
.
setVisibility
(
View
.
GONE
);
container
.
setVisibility
(
View
.
VISIBLE
);
}
@Override
...
...
app/src/main/java/chat/rocket/android/fragment/server_config/LoginFragment.java
View file @
9aa71d49
...
...
@@ -2,6 +2,7 @@ package chat.rocket.android.fragment.server_config;
import
android.os.Bundle
;
import
android.support.annotation.Nullable
;
import
android.support.constraint.ConstraintLayout
;
import
android.support.design.widget.Snackbar
;
import
android.support.v4.app.Fragment
;
import
android.view.View
;
...
...
@@ -23,8 +24,7 @@ import chat.rocket.persistence.realm.repositories.RealmPublicSettingRepository;
public
class
LoginFragment
extends
AbstractServerConfigFragment
implements
LoginContract
.
View
{
private
LoginContract
.
Presenter
presenter
;
private
View
btnEmail
;
private
ConstraintLayout
container
;
private
View
waitingView
;
private
TextView
txtUsername
;
private
TextView
txtPasswd
;
...
...
@@ -47,7 +47,9 @@ public class LoginFragment extends AbstractServerConfigFragment implements Login
@Override
protected
void
onSetupView
()
{
btnEmail
=
rootView
.
findViewById
(
R
.
id
.
btn_login_with_email
);
container
=
(
ConstraintLayout
)
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
);
waitingView
=
rootView
.
findViewById
(
R
.
id
.
waiting
);
...
...
@@ -62,14 +64,14 @@ public class LoginFragment extends AbstractServerConfigFragment implements Login
@Override
public
void
showLoader
()
{
btnEmail
.
setEnabled
(
false
);
container
.
setVisibility
(
View
.
GONE
);
waitingView
.
setVisibility
(
View
.
VISIBLE
);
}
@Override
public
void
hideLoader
()
{
btnEmail
.
setEnabled
(
true
);
waitingView
.
setVisibility
(
View
.
GONE
);
container
.
setVisibility
(
View
.
VISIBLE
);
}
@Override
...
...
app/src/main/res/drawable/container_bg.xml
0 → 100644
View file @
9aa71d49
<?xml version="1.0" encoding="UTF-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<solid
android:color=
"@android:color/white"
/>
<corners
android:radius=
"5dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/fragment_input_hostname.xml
View file @
9aa71d49
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
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:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"?attr/colorPrimaryDark"
tools:context=
"chat.rocket.android.fragment.add_server.InputHostnameFragment"
>
<android.support.constraint.ConstraintLayout
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:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"?attr/colorPrimaryDark"
android:padding=
"@dimen/margin_8"
tools:context=
"chat.rocket.android.fragment.add_server.InputHostnameFragment"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:minWidth=
"288dp"
android:padding=
"@dimen/margin_24"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/container"
android:layout_width=
"wrap_content"
android:minWidth=
"288dp"
android:layout_height=
"wrap_content"
android:padding=
"@dimen/margin_16"
android:background=
"@drawable/container_bg"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"@+id/version_info"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
<LinearLayout
android:layout_width=
"0px"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:orientation=
"vertical"
>
<TextView
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:paddingStart=
"4dp"
android:paddingLeft=
"4dp"
android:text=
"@string/fragment_input_hostname_hostname"
android:textAppearance=
"@style/TextAppearance.AppCompat.Caption"
/>
<EditText
android:id=
"@+id/editor_hostname"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/fragment_input_hostname_server_hint"
android:imeOptions=
"actionGo"
android:inputType=
"textWebEditText"
android:singleLine=
"true"
/>
</LinearLayout>
<TextView
android:id=
"@+id/hostnameTextView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:paddingStart=
"4dp"
android:paddingLeft=
"4dp"
android:text=
"@string/fragment_input_hostname_hostname"
android:textAppearance=
"@style/TextAppearance.AppCompat.Caption"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"@+id/editor_hostname"
app:layout_constraintBottom_toTopOf=
"@+id/editor_hostname"
/>
<Space
android:layout_width=
"@dimen/margin_16"
android:layout_height=
"wrap_content"
/>
<EditText
android:id=
"@+id/editor_hostname"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
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_toBottomOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@+id/btn_connect"
/>
<android.support.design.widget.FloatingActionButton
android:id=
"@+id/btn_connect"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|bottom"
app:elevation=
"2dp"
app:fabSize=
"mini"
app:srcCompat=
"@drawable/ic_arrow_forward_white_24dp"
/>
</LinearLayout>
<android.support.design.widget.FloatingActionButton
android:id=
"@+id/btn_connect"
android:layout_width=
"wrap_content"
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.support.constraint.ConstraintLayout>
<chat.rocket.android.widget.WaitingView
android:id=
"@+id/waiting"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/margin_16"
android:layout_gravity=
"center"
android:visibility=
"gone"
/>
</LinearLayout>
<chat.rocket.android.widget.WaitingView
android:id=
"@+id/waiting"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:visibility=
"gone"
app:layout_constraintTop_toTopOf=
"parent"
app:layout_constraintBottom_toTopOf=
"@id/version_info"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
/>
<TextView
android:id=
"@+id/version_info"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center_horizontal|bottom"
android:layout_margin=
"@dimen/margin_8"
android:textColor=
"@android:color/white"
android:textAppearance=
"@style/TextAppearance.AppCompat.Caption"
/>
</FrameLayout>
\ No newline at end of file
<TextView
android:id=
"@+id/version_info"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@android:color/white"
android:textAppearance=
"@style/TextAppearance.AppCompat.Caption"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_login.xml
View file @
9aa71d49
This diff is collapsed.
Click to expand it.
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