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
daabc489
Commit
daabc489
authored
Mar 15, 2018
by
aniketsingh03
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adds layout for inviting new members to channel
parent
a051ed24
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
202 additions
and
41 deletions
+202
-41
AddMembersModule.kt
...t/android/createChannel/addMembers/di/AddMembersModule.kt
+21
-0
AddMembersProvider.kt
...android/createChannel/addMembers/di/AddMembersProvider.kt
+11
-0
AddMembersPresenter.kt
...ateChannel/addMembers/presentation/AddMembersPresenter.kt
+4
-0
AddMembersView.kt
...d/createChannel/addMembers/presentation/AddMembersView.kt
+7
-0
AddMembersActivity.kt
...android/createChannel/addMembers/ui/AddMembersActivity.kt
+31
-0
CreateNewChannelModule.kt
...rocket/android/createChannel/di/CreateNewChannelModule.kt
+0
-4
CreateNewChannelActivity.kt
...cket/android/createChannel/ui/CreateNewChannelActivity.kt
+27
-3
activity_add_members.xml
app/src/main/res/layout/activity_add_members.xml
+45
-0
activity_create_new_channel.xml
app/src/main/res/layout/activity_create_new_channel.xml
+11
-31
layout_toolbar.xml
app/src/main/res/layout/layout_toolbar.xml
+37
-0
dimens.xml
app/src/main/res/values/dimens.xml
+1
-0
strings.xml
app/src/main/res/values/strings.xml
+7
-3
No files found.
app/src/main/java/chat/rocket/android/createChannel/addMembers/di/AddMembersModule.kt
0 → 100644
View file @
daabc489
package
chat.rocket.android.createChannel.addMembers.di
import
android.arch.lifecycle.LifecycleOwner
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.createChannel.addMembers.ui.AddMembersActivity
import
dagger.Module
import
dagger.Provides
import
kotlinx.coroutines.experimental.Job
@Module
class
AddMembersModule
{
@Provides
fun
provideLifecycleOwner
(
activity
:
AddMembersActivity
):
LifecycleOwner
{
return
activity
}
@Provides
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/createChannel/addMembers/di/AddMembersProvider.kt
0 → 100644
View file @
daabc489
package
chat.rocket.android.createChannel.addMembers.di
import
chat.rocket.android.createChannel.addMembers.ui.AddMembersActivity
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
@Module
abstract
class
AddMembersProvider
{
@ContributesAndroidInjector
(
modules
=
[
AddMembersModule
::
class
])
abstract
fun
provideNewChannelActivity
():
AddMembersActivity
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/createChannel/addMembers/presentation/AddMembersPresenter.kt
0 → 100644
View file @
daabc489
package
chat.rocket.android.createChannel.addMembers.presentation
class
AddMembersPresenter
{
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/createChannel/addMembers/presentation/AddMembersView.kt
0 → 100644
View file @
daabc489
package
chat.rocket.android.createChannel.addMembers.presentation
import
chat.rocket.android.core.behaviours.LoadingView
import
chat.rocket.android.core.behaviours.MessageView
interface
AddMembersView
:
LoadingView
,
MessageView
{
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/createChannel/addMembers/ui/AddMembersActivity.kt
0 → 100644
View file @
daabc489
package
chat.rocket.android.createChannel.addMembers.ui
import
android.support.v7.app.AppCompatActivity
import
chat.rocket.android.createChannel.addMembers.presentation.AddMembersPresenter
import
chat.rocket.android.createChannel.addMembers.presentation.AddMembersView
import
javax.inject.Inject
class
AddMembersActivity
:
AppCompatActivity
(),
AddMembersView
{
override
fun
showLoading
()
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
fun
hideLoading
()
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
fun
showMessage
(
resId
:
Int
)
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
fun
showMessage
(
message
:
String
)
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
fun
showGenericErrorMessage
()
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
@Inject
lateinit
var
presenter
:
AddMembersPresenter
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/createChannel/di/CreateNewChannelModule.kt
View file @
daabc489
...
...
@@ -18,8 +18,4 @@ class CreateNewChannelModule {
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
{
return
CancelStrategy
(
owner
,
jobs
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/createChannel/ui/CreateNewChannelActivity.kt
View file @
daabc489
...
...
@@ -10,10 +10,31 @@ import chat.rocket.android.createChannel.presentation.CreateNewChannelView
import
com.jakewharton.rxbinding2.widget.RxTextView
import
dagger.android.AndroidInjection
import
kotlinx.android.synthetic.main.activity_create_new_channel.*
import
kotlinx.android.synthetic.main.layout_toolbar.*
import
javax.inject.Inject
class
CreateNewChannelActivity
:
AppCompatActivity
(),
CreateNewChannelView
{
override
fun
showLoading
()
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
fun
hideLoading
()
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
fun
showMessage
(
resId
:
Int
)
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
fun
showMessage
(
message
:
String
)
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
override
fun
showGenericErrorMessage
()
{
TODO
(
"not implemented"
)
//To change body of created functions use File | Settings | File Templates.
}
@Inject
lateinit
var
presenter
:
CreateNewChannelPresenter
private
var
channelType
:
String
=
"public"
...
...
@@ -39,13 +60,16 @@ class CreateNewChannelActivity : AppCompatActivity(), CreateNewChannelView {
private
fun
setUpToolBar
()
{
setSupportActionBar
(
toolbar
)
toolbar_title
.
text
=
getString
(
R
.
string
.
title_create_new_channel
)
toolbar_action_text
.
text
=
getString
(
R
.
string
.
action_create_new_channel
)
supportActionBar
?.
setDisplayHomeAsUpEnabled
(
true
)
RxTextView
.
textChanges
(
channel_name_edit_text
).
subscribe
{
text
->
create_channel
_action_text
.
isEnabled
=
text
.
isNotEmpty
()
toolbar
_action_text
.
isEnabled
=
text
.
isNotEmpty
()
if
(
text
.
isEmpty
())
create_channel
_action_text
.
alpha
=
0.8f
toolbar
_action_text
.
alpha
=
0.8f
else
create_channel
_action_text
.
alpha
=
1.0f
toolbar
_action_text
.
alpha
=
1.0f
}
}
...
...
app/src/main/res/layout/activity_add_members.xml
0 → 100644
View file @
daabc489
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
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"
>
<include
android:id=
"@+id/toolbar_layout"
layout=
"@layout/layout_toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
app:layout_constraintTop_toTopOf=
"parent"
/>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/layout_container"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/toolbar_layout"
>
<EditText
android:id=
"@+id/search_edit_text"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"8dp"
android:backgroundTint=
"@color/colorLightTheme"
android:hint=
"@string/msg_search"
/>
<View
android:id=
"@+id/separator_1"
android:layout_width=
"match_parent"
android:layout_height=
"0.2dp"
android:background=
"@color/colorDividerMessageComposer"
app:layout_constraintTop_toBottomOf=
"@id/search_edit_text"
/>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/search_results"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_margin=
"8dp"
app:layout_constraintTop_toBottomOf=
"@id/separator_1"
/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/activity_create_new_channel.xml
View file @
daabc489
...
...
@@ -4,44 +4,24 @@
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.support.v7.widget.Toolbar
android:id=
"@+id/toolbar"
<include
android:id=
"@+id/toolbar_layout"
layout=
"@layout/layout_toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/toolbar_height"
android:background=
"@color/colorPrimary"
app:layout_scrollFlags=
"scroll|enterAlways"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
app:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
>
<TextView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:text=
"@string/title_create_new_channel"
android:textColor=
"@color/colorLightTheme"
android:textSize=
"20sp"
/>
<TextView
android:id=
"@+id/create_channel_action_text"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"16dp"
android:alpha=
"0.7"
android:background=
"?selectableItemBackground"
android:enabled=
"false"
android:gravity=
"end"
android:text=
"@string/create_new_channel_action"
android:textSize=
"16sp"
/>
</android.support.v7.widget.Toolbar>
android:layout_height=
"wrap_content"
app:layout_constraintBottom_toTopOf=
"@+id/layout_container"
app:layout_constraintTop_toTopOf=
"parent"
/>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/layout_container"
android:layout_width=
"0dp"
android:layout_height=
"0dp"
android:padding=
"8dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintHorizontal_bias=
"0.0"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/toolbar"
>
app:layout_constraintTop_toBottomOf=
"@id/toolbar
_layout
"
>
<android.support.constraint.Guideline
android:id=
"@+id/button_top_guideline"
...
...
@@ -126,7 +106,7 @@
android:layout_marginStart=
"8dp"
android:layout_marginTop=
"8dp"
android:focusable=
"true"
android:hint=
"@string/
new_channel_edit_text_hint
"
android:hint=
"@string/
msg_channel_name
"
app:layout_constraintEnd_toEndOf=
"parent"
app:layout_constraintStart_toEndOf=
"@id/placeholder"
app:layout_constraintTop_toBottomOf=
"@id/separator_1"
>
...
...
@@ -159,7 +139,7 @@
android:id=
"@+id/add_members_text"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:text=
"@string/
add_members_helper_text
"
android:text=
"@string/
msg_add_members
"
android:textColor=
"@color/black"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintHorizontal_chainStyle=
"spread"
...
...
app/src/main/res/layout/layout_toolbar.xml
0 → 100644
View file @
daabc489
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/toolbar_container"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.support.v7.widget.Toolbar
android:id=
"@+id/toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/toolbar_height"
android:background=
"@color/colorPrimary"
app:layout_scrollFlags=
"scroll|enterAlways"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
app:theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar"
>
<TextView
android:id=
"@+id/toolbar_title"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:textColor=
"@color/colorLightTheme"
android:textSize=
"20sp"
/>
<TextView
android:id=
"@+id/toolbar_action_text"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"16dp"
android:alpha=
"0.7"
android:background=
"?selectableItemBackground"
android:enabled=
"false"
android:gravity=
"end"
android:textSize=
"16sp"
/>
</android.support.v7.widget.Toolbar>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/values/dimens.xml
View file @
daabc489
...
...
@@ -22,6 +22,7 @@
<!--Toolbar-->
<dimen
name=
"toolbar_height"
>
56dp
</dimen>
<!-- Message -->
<dimen
name=
"padding_quote"
>
8dp
</dimen>
<dimen
name=
"padding_mention"
>
4dp
</dimen>
...
...
app/src/main/res/values/strings.xml
View file @
daabc489
...
...
@@ -13,6 +13,7 @@
<string
name=
"title_password"
>
Change Password
</string>
<string
name=
"title_update_profile"
>
Update profile
</string>
<string
name=
"title_create_new_channel"
>
Create New Channel
</string>
<string
name=
"title_add_members"
>
Invite Members
</string>
<!-- Actions -->
<string
name=
"action_connect"
>
Connect
</string>
...
...
@@ -67,13 +68,14 @@
<string
name=
"msg_utc_offset"
>
UTC offset
</string>
<string
name=
"msg_new_password"
>
Enter New Password
</string>
<string
name=
"msg_confirm_password"
>
Confirm New Password
</string>
<string
name=
"msg_channel_name"
>
Channel Name
</string>
<string
name=
"msg_add_members"
>
Add Members
</string>
<string
name=
"msg_search"
>
Search
</string>
<string
name=
"private_channel_type"
>
Private
</string>
<string
name=
"public_channel_type"
>
Public
</string>
<string
name=
"private_channel_type_description"
>
Visible only to you and those whom you invite
</string>
<string
name=
"public_channel_description"
>
Visible to everyone
</string>
<string
name=
"new_channel_edit_text_hint"
>
Channel Name
</string>
<string
name=
"create_new_channel_action"
>
CREATE
</string>
<string
name=
"add_members_helper_text"
>
Add Members
</string>
<!-- System messages -->
<string
name=
"message_room_name_changed"
>
Room name changed to: %1$s by %2$s
</string>
...
...
@@ -96,6 +98,8 @@
<string
name=
"action_msg_star"
>
Star Message
</string>
<string
name=
"action_msg_share"
>
Share
</string>
<string
name=
"action_title_editing"
>
Editing Message
</string>
<string
name=
"action_create_new_channel"
>
CREATE
</string>
<!-- Permission messages -->
<string
name=
"permission_editing_not_allowed"
>
Editing is not allowed
</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