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
b968f97a
Commit
b968f97a
authored
Jul 04, 2017
by
Rafael Kellermann Streit
Committed by
GitHub
Jul 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #339 from filipedelimabrito/develop
Add waiting view to hostname screen/layout
parents
625dbcaf
14133a9a
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
175 additions
and
153 deletions
+175
-153
InputHostnameFragment.java
...et/android/fragment/add_server/InputHostnameFragment.java
+5
-2
fragment_room.xml
app/src/main/res/layout-w720dp/fragment_room.xml
+5
-3
fragment_input_hostname.xml
app/src/main/res/layout/fragment_input_hostname.xml
+42
-26
fragment_login.xml
app/src/main/res/layout/fragment_login.xml
+92
-90
fragment_room.xml
app/src/main/res/layout/fragment_room.xml
+10
-8
fragment_room_main.xml
app/src/main/res/layout/fragment_room_main.xml
+1
-3
room_side_menu.xml
app/src/main/res/layout/room_side_menu.xml
+20
-21
No files found.
app/src/main/java/chat/rocket/android/fragment/add_server/InputHostnameFragment.java
View file @
b968f97a
...
...
@@ -21,9 +21,9 @@ import chat.rocket.android.service.ConnectivityManager;
public
class
InputHostnameFragment
extends
AbstractFragment
implements
InputHostnameContract
.
View
{
private
InputHostnameContract
.
Presenter
presenter
;
private
View
waitingView
;
public
InputHostnameFragment
()
{
}
public
InputHostnameFragment
()
{}
@Override
public
void
onCreate
(
@Nullable
Bundle
savedInstanceState
)
{
...
...
@@ -45,6 +45,7 @@ public class InputHostnameFragment extends AbstractFragment implements InputHost
protected
void
onSetupView
()
{
setupVersionInfo
();
waitingView
=
rootView
.
findViewById
(
R
.
id
.
waiting
);
rootView
.
findViewById
(
R
.
id
.
btn_connect
).
setOnClickListener
(
view
->
handleConnect
());
}
...
...
@@ -82,11 +83,13 @@ public class InputHostnameFragment extends AbstractFragment implements InputHost
@Override
public
void
showLoader
()
{
rootView
.
findViewById
(
R
.
id
.
btn_connect
).
setEnabled
(
false
);
waitingView
.
setVisibility
(
View
.
VISIBLE
);
}
@Override
public
void
hideLoader
()
{
rootView
.
findViewById
(
R
.
id
.
btn_connect
).
setEnabled
(
true
);
waitingView
.
setVisibility
(
View
.
GONE
);
}
@Override
...
...
app/src/main/res/layout-w720dp/fragment_room.xml
View file @
b968f97a
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
>
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"horizontal"
tools:context=
"chat.rocket.android.fragment.chatroom.RoomFragment"
>
<include
layout=
"@layout/fragment_room_main"
/>
...
...
app/src/main/res/layout/fragment_input_hostname.xml
View file @
b968f97a
<?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"
>
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"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white
"
android:minWidth=
"288dp
"
android:orientation=
"horizontal
"
android:padding=
"@dimen/margin_24
"
>
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
"
>
<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
<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
<EditText
android:id=
"@+id/editor_hostname"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
...
...
@@ -35,13 +43,13 @@
android:imeOptions=
"actionGo"
android:inputType=
"textWebEditText"
android:singleLine=
"true"
/>
</LinearLayout>
</LinearLayout>
<Space
android:layout_width=
"@dimen/margin_
8
"
<Space
android:layout_width=
"@dimen/margin_
16
"
android:layout_height=
"wrap_content"
/>
<android.support.design.widget.FloatingActionButton
<android.support.design.widget.FloatingActionButton
android:id=
"@+id/btn_connect"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
...
...
@@ -49,15 +57,23 @@
app:elevation=
"2dp"
app:fabSize=
"mini"
app:srcCompat=
"@drawable/ic_arrow_forward_white_24dp"
/>
</LinearLayout>
</LinearLayout>
<Text
View
android:id=
"@+id/
version_info
"
<chat.rocket.android.widget.Waiting
View
android:id=
"@+id/
waiting
"
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"
tools:text=
"Version: 1.0"
/>
android:layout_marginTop=
"@dimen/margin_16"
android:layout_gravity=
"center"
android:visibility=
"gone"
/>
</LinearLayout>
<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
app/src/main/res/layout/fragment_login.xml
View file @
b968f97a
<?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"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"?attr/colorPrimaryDark"
>
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.server_config.LoginFragment"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:minWidth=
"288dp"
android:orientation=
"vertical"
android:padding=
"@dimen/margin_24"
>
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"center"
android:background=
"@color/white"
android:minWidth=
"288dp"
android:orientation=
"vertical"
android:padding=
"@dimen/margin_24"
>
<LinearLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<io.github.yusukeiwaki.android.widget.FontAwesomeButton
android:id=
"@+id/btn_login_with_twitter"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_marginEnd=
"@dimen/margin_8"
android:text=
"@string/fa_twitter"
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
android:id=
"@+id/btn_login_with_twitter"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_marginEnd=
"@dimen/margin_8"
android:text=
"@string/fa_twitter"
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
<io.github.yusukeiwaki.android.widget.FontAwesomeButton
android:id=
"@+id/btn_login_with_facebook"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_marginEnd=
"@dimen/margin_8"
android:text=
"@string/fa_facebook_official"
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
android:id=
"@+id/btn_login_with_facebook"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_marginEnd=
"@dimen/margin_8"
android:text=
"@string/fa_facebook_official"
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
<io.github.yusukeiwaki.android.widget.FontAwesomeButton
android:id=
"@+id/btn_login_with_github"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_marginEnd=
"@dimen/margin_8"
android:text=
"@string/fa_github"
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
android:id=
"@+id/btn_login_with_github"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_marginEnd=
"@dimen/margin_8"
android:text=
"@string/fa_github"
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
<io.github.yusukeiwaki.android.widget.FontAwesomeButton
android:id=
"@+id/btn_login_with_google"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_marginEnd=
"@dimen/margin_8"
android:text=
"@string/fa_google"
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
android:id=
"@+id/btn_login_with_google"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:layout_marginEnd=
"@dimen/margin_8"
android:text=
"@string/fa_google"
android:textSize=
"16dp"
android:layout_marginRight=
"@dimen/margin_8"
/>
</LinearLayout>
<android.support.design.widget.TextInputLayout
android:id=
"@+id/text_input_username"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
android:id=
"@+id/text_input_username"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
>
<android.support.design.widget.TextInputEditText
android:id=
"@+id/editor_username"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/fragment_login_username_or_email"
android:imeOptions=
"actionNext"
android:inputType=
"textWebEmailAddress"
android:singleLine=
"true"
/>
android:id=
"@+id/editor_username"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/fragment_login_username_or_email"
android:imeOptions=
"actionNext"
android:inputType=
"textWebEmailAddress"
android:singleLine=
"true"
/>
</android.support.design.widget.TextInputLayout>
<Space
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/margin_8"
/>
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/margin_8"
/>
<android.support.design.widget.TextInputLayout
android:id=
"@+id/text_input_passwd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:passwordToggleEnabled=
"true"
>
android:id=
"@+id/text_input_passwd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:passwordToggleEnabled=
"true"
>
<android.support.design.widget.TextInputEditText
android:id=
"@+id/editor_passwd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/fragment_login_password"
android:imeOptions=
"actionNext"
android:inputType=
"textWebPassword"
android:singleLine=
"true"
/>
android:id=
"@+id/editor_passwd"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:hint=
"@string/fragment_login_password"
android:imeOptions=
"actionNext"
android:inputType=
"textWebPassword"
android:singleLine=
"true"
/>
</android.support.design.widget.TextInputLayout>
<Space
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/margin_16"
/>
android:layout_width=
"wrap_content"
android:layout_height=
"@dimen/margin_16"
/>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
>
<android.support.design.widget.FloatingActionButton
android:id=
"@+id/btn_user_registration"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"start|bottom"
app:backgroundTint=
"@color/white"
app:elevation=
"2dp"
app:fabSize=
"mini"
app:srcCompat=
"@drawable/ic_user_registration_blue_24dp"
/>
android:id=
"@+id/btn_user_registration"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"start|bottom"
app:backgroundTint=
"@color/white"
app:elevation=
"2dp"
app:fabSize=
"mini"
app:srcCompat=
"@drawable/ic_user_registration_blue_24dp"
/>
<android.support.design.widget.FloatingActionButton
android:id=
"@+id/btn_login_with_email"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|bottom"
app:elevation=
"2dp"
app:fabSize=
"normal"
app:srcCompat=
"@drawable/ic_arrow_forward_white_24dp"
/>
android:id=
"@+id/btn_login_with_email"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"end|bottom"
app:elevation=
"2dp"
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"
/>
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
app/src/main/res/layout/fragment_room.xml
View file @
b968f97a
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/drawer_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/drawer_layout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
"chat.rocket.android.fragment.chatroom.RoomFragment"
>
<include
layout=
"@layout/fragment_room_main"
/>
<FrameLayout
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"end"
android:clickable=
"true"
android:theme=
"@style/AppTheme.Dark"
>
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"end"
android:clickable=
"true"
android:theme=
"@style/AppTheme.Dark"
>
<include
layout=
"@layout/room_side_menu"
/>
</FrameLayout>
...
...
app/src/main/res/layout/fragment_room_main.xml
View file @
b968f97a
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/messageListRelativeLayout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
tools:context=
"chat.rocket.android.fragment.chatroom.RoomFragment"
>
android:layout_height=
"match_parent"
>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/messageRecyclerView"
...
...
app/src/main/res/layout/room_side_menu.xml
View file @
b968f97a
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/room_side_menu"
android:layout_width=
"48dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"end"
android:orientation=
"vertical"
>
android:id=
"@+id/room_side_menu"
android:layout_width=
"48dp"
android:layout_height=
"match_parent"
android:layout_gravity=
"end"
android:orientation=
"vertical"
>
<io.github.yusukeiwaki.android.widget.FontAwesomeButton
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:enabled=
"false"
android:text=
"@string/fa_search"
android:textSize=
"24dp"
/>
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:enabled=
"false"
android:text=
"@string/fa_search"
android:textSize=
"24dp"
/>
<io.github.yusukeiwaki.android.widget.FontAwesomeButton
android:id=
"@+id/btn_users"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:text=
"@string/fa_users"
android:textSize=
"24dp"
/>
android:id=
"@+id/btn_users"
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:text=
"@string/fa_users"
android:textSize=
"24dp"
/>
<io.github.yusukeiwaki.android.widget.FontAwesomeButton
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:enabled=
"false"
android:text=
"@string/fa_at"
android:textSize=
"24dp"
/>
android:layout_width=
"48dp"
android:layout_height=
"48dp"
android:enabled=
"false"
android:text=
"@string/fa_at"
android:textSize=
"24dp"
/>
</LinearLayout>
\ 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