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
b6b8ada6
Commit
b6b8ada6
authored
Feb 23, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop-2.x' into emoji-keyboard
parents
6021c1f2
e719508d
Changes
48
Hide whitespace changes
Inline
Side-by-side
Showing
48 changed files
with
419 additions
and
276 deletions
+419
-276
build-sdk.sh
app/build-sdk.sh
+29
-28
build.gradle
app/build.gradle
+7
-1
LoginFragmentProvider.kt
.../android/authentication/login/di/LoginFragmentProvider.kt
+1
-1
AuthenticationNavigator.kt
...id/authentication/presentation/AuthenticationNavigator.kt
+4
-3
ServerFragmentProvider.kt
...ndroid/authentication/server/di/ServerFragmentProvider.kt
+3
-2
PinnedMessagesFragmentModule.kt
...ocket/android/chatroom/di/PinnedMessagesFragmentModule.kt
+1
-1
ChatRoomActivity.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomActivity.kt
+5
-1
ChatRoomFragment.kt
.../java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
+3
-5
ChatRoomsPresenter.kt
...cket/android/chatrooms/presentation/ChatRoomsPresenter.kt
+0
-32
ChatRoomsView.kt
...at/rocket/android/chatrooms/presentation/ChatRoomsView.kt
+1
-6
ChatRoomsAdapter.kt
...java/chat/rocket/android/chatrooms/ui/ChatRoomsAdapter.kt
+7
-0
ChatRoomsFragment.kt
...ava/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
+4
-20
ActivityBuilder.kt
...java/chat/rocket/android/dagger/module/ActivityBuilder.kt
+8
-1
MessageParser.kt
...src/main/java/chat/rocket/android/helper/MessageParser.kt
+3
-2
MainActivityModule.kt
...in/java/chat/rocket/android/main/di/MainActivityModule.kt
+23
-0
MainActivityProvider.kt
.../java/chat/rocket/android/main/di/MainActivityProvider.kt
+12
-0
MainModule.kt
app/src/main/java/chat/rocket/android/main/di/MainModule.kt
+16
-0
MainNavigator.kt
...va/chat/rocket/android/main/presentation/MainNavigator.kt
+23
-0
MainPresenter.kt
...va/chat/rocket/android/main/presentation/MainPresenter.kt
+52
-0
MainView.kt
...in/java/chat/rocket/android/main/presentation/MainView.kt
+11
-0
MainActivity.kt
...src/main/java/chat/rocket/android/main/ui/MainActivity.kt
+26
-18
Animation.kt
...ain/java/chat/rocket/android/util/extensions/Animation.kt
+2
-2
DividerItemDecoration.kt
.../java/chat/rocket/android/widget/DividerItemDecoration.kt
+5
-5
close_enter.xml
app/src/main/res/anim/close_enter.xml
+5
-2
close_exit.xml
app/src/main/res/anim/close_exit.xml
+3
-1
open_enter.xml
app/src/main/res/anim/open_enter.xml
+3
-1
open_exit.xml
app/src/main/res/anim/open_exit.xml
+5
-2
ic_exit_to_app_black_24dp.xml
app/src/main/res/drawable/ic_exit_to_app_black_24dp.xml
+11
-0
ic_settings_black_24dp.xml
app/src/main/res/drawable/ic_settings_black_24dp.xml
+9
-0
style_message_file_upload_content_bg.xml
...ain/res/drawable/style_message_file_upload_content_bg.xml
+0
-15
style_message_file_upload_layout_bg.xml
...main/res/drawable/style_message_file_upload_layout_bg.xml
+0
-11
fragment_authentication_log_in.xml
app/src/main/res/layout/fragment_authentication_log_in.xml
+4
-4
fragment_authentication_server.xml
app/src/main/res/layout/fragment_authentication_server.xml
+4
-4
fragment_authentication_sign_up.xml
app/src/main/res/layout/fragment_authentication_sign_up.xml
+6
-6
fragment_authentication_two_fa.xml
app/src/main/res/layout/fragment_authentication_two_fa.xml
+3
-4
fragment_profile.xml
app/src/main/res/layout/fragment_profile.xml
+3
-3
item_chat.xml
app/src/main/res/layout/item_chat.xml
+37
-42
item_message.xml
app/src/main/res/layout/item_message.xml
+5
-7
message_attachment.xml
app/src/main/res/layout/message_attachment.xml
+0
-16
unread_messages_badge.xml
app/src/main/res/layout/unread_messages_badge.xml
+2
-2
chatrooms.xml
app/src/main/res/menu/chatrooms.xml
+0
-5
navigation.xml
app/src/main/res/menu/navigation.xml
+20
-1
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+1
-0
colors.xml
app/src/main/res/values/colors.xml
+6
-4
dimens.xml
app/src/main/res/values/dimens.xml
+3
-0
strings.xml
app/src/main/res/values/strings.xml
+2
-1
styles.xml
app/src/main/res/values/styles.xml
+37
-16
dependencies.gradle
dependencies.gradle
+4
-1
No files found.
app/build-sdk.sh
View file @
b6b8ada6
#!/bin/bash
CURRENT_DIR
=
`
pwd
`
CURRENT_DIR
=
$(
pwd
)
# The SDK dir should be 2 directories up in the tree, so we use dirname 2 times
# to get the common parent dir of the SDK and the app
GIT
=
`
which git
`
tmp
=
`
dirname
$CURRENT_DIR
`
tmp
=
`
dirname
$tmp
`
GIT
=
$(
which git
)
cd
../..
tmp
=
$(
pwd
)
SDK_DIR
=
"
$tmp
/Rocket.Chat.Kotlin.SDK"
cd
"
${
CURRENT_DIR
}
"
echo
"CURRENT DIR:
$CURRENT_DIR
"
echo
"SDK DIR:
$SDK_DIR
"
# check if there are changes not commited
# check if there are changes not commit
t
ed
function
git_stat
{
local
__resultv
ar
=
$1
cd
$SDK_DIR
&&
$GIT
diff
--shortstat
--exit-code
eval
$
__resultvar
=
"'
$?
'"
local
resultV
ar
=
$1
cd
"
${
SDK_DIR
}
"
&&
"
${
GIT
}
"
diff
--shortstat
--exit-code
eval
$
{
resultVar
}
=
"'
$?
'"
}
# check for changes already on the index not commited
# check for changes already on the index not commit
t
ed
function
git_stat_cached
{
local
__resultv
ar
=
$1
cd
$SDK_DIR
&&
$GIT
diff
--cached
--shortstat
--exit-code
eval
$
__resultvar
=
"'
$?
'"
local
resultV
ar
=
$1
cd
"
${
SDK_DIR
}
"
&&
"
${
GIT
}
"
diff
--cached
--shortstat
--exit-code
eval
$
{
resultVar
}
=
"'
$?
'"
}
# get the SHA of the la
s
test commit
# get the SHA of the latest commit
function
git_sha
{
temp_sha
=
`
cd
$SDK_DIR
&&
$GIT
rev-parse
--short
HEAD
`
temp_sha
=
$(
cd
"
${
SDK_DIR
}
"
&&
"
${
GIT
}
"
rev-parse
--short
HEAD
)
echo
"
$temp_sha
"
}
function
git_app_branch
{
temp_branch
=
`
cd
$CURRENT_DIR
&&
$GIT
rev-parse
--abbrev-ref
HEAD
`
temp_branch
=
$(
cd
"
${
CURRENT_DIR
}
"
&&
"
${
GIT
}
"
rev-parse
--abbrev-ref
HEAD
)
echo
"
$temp_branch
"
}
# check if the tree is dirty (has modifications not commited yet)
# check if the tree is dirty (has modifications not commit
t
ed yet)
function
check_git_dirty
{
git_stat
stat
git_stat_cached cached
if
[
$
stat
-eq
0
]
&&
[
$cached
-eq
0
]
;
then
if
[
$
{
stat
}
-eq
0
]
&&
[
${
cached
}
-eq
0
]
;
then
echo
"not dirty"
return
1
else
...
...
@@ -52,11 +53,11 @@ function check_git_dirty {
# check if the saved last commit is the same as the latest SHA in the tree
function
check_last_commit
{
if
[
!
-f
$
SDK_DIR
/.last_commit_hash
]
;
then
if
[
!
-f
$
{
SDK_DIR
}
/.last_commit_hash
]
;
then
echo
"last_commit_hash not found"
return
0
fi
saved_hash
=
`
cat
$SDK_DIR
/.last_commit_hash
`
saved_hash
=
$(
cat
"
${
SDK_DIR
}
"
/.last_commit_hash
)
last_hash
=
$(
git_sha
)
#`cd $SDK_DIR && git rev-parse --short HEAD`
if
[
"
$saved_hash
"
==
"
$last_hash
"
]
;
then
...
...
@@ -70,7 +71,7 @@ function check_last_commit {
function
checkout_matching_branch
{
app_branch
=
$(
git_app_branch
)
cd
$SDK_DIR
&&
$GIT
checkout
$app_branch
1>/dev/null 2>/dev/null
cd
"
${
SDK_DIR
}
"
&&
"
${
GIT
}
"
checkout
"
${
app_branch
}
"
1>/dev/null 2>/dev/null
}
checkout_matching_branch
...
...
@@ -82,20 +83,20 @@ fi
echo
"CURRENT SHA:
$SHA
"
# if the tree is not dirty, there is no new commit and the .jars are still there, just skip the build
if
!
check_git_dirty
&&
!
check_last_commit
&&
[
-f
$CURRENT_DIR
/libs/common-
$SHA
.jar
]
&&
[
-f
$CURRENT_DIR
/libs/core-
$SHA
.jar
]
;
then
if
!
check_git_dirty
&&
!
check_last_commit
&&
[
-f
"
${
CURRENT_DIR
}
"
/libs/common-
"
${
SHA
}
"
.jar
]
&&
[
-f
"
${
CURRENT_DIR
}
"
/libs/core-
"
${
SHA
}
"
.jar
]
;
then
echo
"NO BUILD NEEDED"
exit
0
fi
cd
$SDK_DIR
&&
./gradlew common:assemble
&&
cd
$CURRENT_DIR
cd
$SDK_DIR
&&
./gradlew core:assemble
&&
cd
$CURRENT_DIR
cd
"
${
SDK_DIR
}
"
&&
./gradlew common:assemble
&&
cd
"
${
CURRENT_DIR
}
"
cd
"
${
SDK_DIR
}
"
&&
./gradlew core:assemble
&&
cd
"
${
CURRENT_DIR
}
"
rm
$CURRENT_DIR
/libs/common
*
$CURRENT_DIR
/libs/core
*
rm
"
${
CURRENT_DIR
}
"
/libs/common
*
"
${
CURRENT_DIR
}
"
/libs/core
*
mkdir
-p
$CURRENT_DIR
/libs/
cp
-v
$SDK_DIR
/common/build/libs/common-0.1-SNAPSHOT.jar
$CURRENT_DIR
/libs/common-
$SHA
.jar
cp
-v
$SDK_DIR
/core/build/libs/core-0.1-SNAPSHOT.jar
$CURRENT_DIR
/libs/core-
$SHA
.jar
mkdir
-p
"
${
CURRENT_DIR
}
"
/libs/
cp
-v
"
${
SDK_DIR
}
"
/common/build/libs/common-0.1-SNAPSHOT.jar
"
${
CURRENT_DIR
}
"
/libs/common-
"
${
SHA
}
"
.jar
cp
-v
"
${
SDK_DIR
}
"
/core/build/libs/core-0.1-SNAPSHOT.jar
"
${
CURRENT_DIR
}
"
/libs/core-
"
${
SHA
}
"
.jar
echo
"
$SHA
"
>
$SDK_DIR
/.last_commit_hash
echo
"
$SHA
"
>
"
${
SDK_DIR
}
"
/.last_commit_hash
exit
0
\ No newline at end of file
app/build.gradle
View file @
b6b8ada6
...
...
@@ -105,6 +105,8 @@ dependencies {
implementation
libraries
.
aVLoadingIndicatorView
implementation
libraries
.
swipeBackLayout
implementation
(
'com.crashlytics.sdk.android:crashlytics:2.6.8@aar'
)
{
transitive
=
true
}
...
...
@@ -124,7 +126,11 @@ kotlin {
// FIXME - build and install the sdk into the app/libs directory
// We were having some issues with the kapt generated files from the sdk when importing as a module
task
compileSdk
(
type:
Exec
)
{
commandLine
'./build-sdk.sh'
if
(
System
.
getProperty
(
'os.name'
).
toLowerCase
(
Locale
.
ROOT
).
contains
(
'windows'
))
{
commandLine
'cmd'
,
'/c'
,
'build-sdk.sh'
}
else
{
commandLine
'./build-sdk.sh'
}
}
preBuild
.
dependsOn
compileSdk
...
...
app/src/main/java/chat/rocket/android/authentication/login/di/LoginFragmentProvider.kt
View file @
b6b8ada6
...
...
@@ -6,6 +6,6 @@ import dagger.android.ContributesAndroidInjector
@Module
abstract
class
LoginFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
(
LoginFragmentModule
::
class
)
])
@ContributesAndroidInjector
(
modules
=
[
LoginFragmentModule
::
class
])
abstract
fun
provideLoginFragment
():
LoginFragment
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/authentication/presentation/AuthenticationNavigator.kt
View file @
b6b8ada6
...
...
@@ -12,20 +12,21 @@ import chat.rocket.android.util.extensions.addFragmentBackStack
import
chat.rocket.android.webview.webViewIntent
class
AuthenticationNavigator
(
internal
val
activity
:
AuthenticationActivity
,
internal
val
context
:
Context
)
{
fun
toLogin
()
{
activity
.
addFragmentBackStack
(
"
l
oginFragment"
,
R
.
id
.
fragment_container
)
{
activity
.
addFragmentBackStack
(
"
L
oginFragment"
,
R
.
id
.
fragment_container
)
{
LoginFragment
.
newInstance
()
}
}
fun
toTwoFA
(
username
:
String
,
password
:
String
)
{
activity
.
addFragmentBackStack
(
"
t
woFAFragment"
,
R
.
id
.
fragment_container
)
{
activity
.
addFragmentBackStack
(
"
T
woFAFragment"
,
R
.
id
.
fragment_container
)
{
TwoFAFragment
.
newInstance
(
username
,
password
)
}
}
fun
toSignUp
()
{
activity
.
addFragmentBackStack
(
"
s
ignupFragment"
,
R
.
id
.
fragment_container
)
{
activity
.
addFragmentBackStack
(
"
S
ignupFragment"
,
R
.
id
.
fragment_container
)
{
SignupFragment
.
newInstance
()
}
}
...
...
app/src/main/java/chat/rocket/android/authentication/server/di/ServerFragmentProvider.kt
View file @
b6b8ada6
...
...
@@ -4,8 +4,9 @@ import chat.rocket.android.authentication.server.ui.ServerFragment
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
@Module
abstract
class
ServerFragmentProvider
{
@Module
abstract
class
ServerFragmentProvider
{
@ContributesAndroidInjector
(
modules
=
[
(
ServerFragmentModule
::
class
)
])
@ContributesAndroidInjector
(
modules
=
[
ServerFragmentModule
::
class
])
abstract
fun
provideServerFragment
():
ServerFragment
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatroom/di/PinnedMessagesFragmentModule.kt
View file @
b6b8ada6
...
...
@@ -24,7 +24,7 @@ class PinnedMessagesFragmentModule {
}
@Provides
fun
providePinnedMessageView
(
frag
:
PinnedMessagesFragment
):
PinnedMessagesView
{
fun
providePinnedMessage
s
View
(
frag
:
PinnedMessagesFragment
):
PinnedMessagesView
{
return
frag
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomActivity.kt
View file @
b6b8ada6
...
...
@@ -15,6 +15,8 @@ import dagger.android.AndroidInjector
import
dagger.android.DispatchingAndroidInjector
import
dagger.android.support.HasSupportFragmentInjector
import
kotlinx.android.synthetic.main.app_bar_chat_room.*
import
me.imid.swipebacklayout.lib.SwipeBackLayout
import
me.imid.swipebacklayout.lib.app.SwipeBackActivity
import
javax.inject.Inject
...
...
@@ -32,7 +34,7 @@ private const val INTENT_CHAT_ROOM_NAME = "chat_room_name"
private
const
val
INTENT_CHAT_ROOM_TYPE
=
"chat_room_type"
private
const
val
INTENT_IS_CHAT_ROOM_READ_ONLY
=
"is_chat_room_read_only"
class
ChatRoomActivity
:
AppCompat
Activity
(),
HasSupportFragmentInjector
{
class
ChatRoomActivity
:
SwipeBack
Activity
(),
HasSupportFragmentInjector
{
@Inject
lateinit
var
fragmentDispatchingAndroidInjector
:
DispatchingAndroidInjector
<
Fragment
>
private
lateinit
var
chatRoomId
:
String
private
lateinit
var
chatRoomName
:
String
...
...
@@ -56,6 +58,8 @@ class ChatRoomActivity : AppCompatActivity(), HasSupportFragmentInjector {
isChatRoomReadOnly
=
intent
.
getBooleanExtra
(
INTENT_IS_CHAT_ROOM_READ_ONLY
,
true
)
requireNotNull
(
chatRoomType
)
{
"no is_chat_room_read_only provided in Intent extras"
}
swipeBackLayout
.
setEdgeTrackingEnabled
(
SwipeBackLayout
.
EDGE_LEFT
)
setupToolbar
(
chatRoomName
)
addFragment
(
"ChatRoomFragment"
,
R
.
id
.
fragment_container
)
{
...
...
app/src/main/java/chat/rocket/android/chatroom/ui/ChatRoomFragment.kt
View file @
b6b8ada6
...
...
@@ -301,10 +301,8 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiFragment.EmojiKeyboardLi
if
(!
recyclerView
.
canScrollVertically
(
1
))
{
button_fab
.
hide
()
}
else
{
if
(
dy
>
0
&&
!
button_fab
.
isVisible
())
{
if
(
dy
<
0
&&
!
button_fab
.
isVisible
())
{
button_fab
.
show
()
}
else
if
(
dy
<
0
&&
button_fab
.
isVisible
())
{
button_fab
.
hide
()
}
}
}
...
...
@@ -377,11 +375,11 @@ class ChatRoomFragment : Fragment(), ChatRoomView, EmojiFragment.EmojiKeyboardLi
button_files
.
setOnClickListener
{
handler
.
postDelayed
({
presenter
.
selectFile
()
},
3
00
)
},
2
00
)
handler
.
postDelayed
({
hideAttachmentOptions
()
},
6
00
)
},
4
00
)
}
button_add_reaction
.
setOnClickListener
{
view
->
...
...
app/src/main/java/chat/rocket/android/chatrooms/presentation/ChatRoomsPresenter.kt
View file @
b6b8ada6
package
chat.rocket.android.chatrooms.presentation
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.infrastructure.LocalRepository
import
chat.rocket.android.server.domain.GetChatRoomsInteractor
import
chat.rocket.android.server.domain.GetCurrentServerInteractor
import
chat.rocket.android.server.domain.RefreshSettingsInteractor
...
...
@@ -13,8 +12,6 @@ import chat.rocket.core.RocketChatClient
import
chat.rocket.core.internal.model.Subscription
import
chat.rocket.core.internal.realtime.*
import
chat.rocket.core.internal.rest.chatRooms
import
chat.rocket.core.internal.rest.logout
import
chat.rocket.core.internal.rest.unregisterPushToken
import
chat.rocket.core.model.ChatRoom
import
chat.rocket.core.model.Room
import
kotlinx.coroutines.experimental.*
...
...
@@ -28,7 +25,6 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
private
val
serverInteractor
:
GetCurrentServerInteractor
,
private
val
getChatRoomsInteractor
:
GetChatRoomsInteractor
,
private
val
saveChatRoomsInteractor
:
SaveChatRoomsInteractor
,
private
val
localRepository
:
LocalRepository
,
private
val
refreshSettingsInteractor
:
RefreshSettingsInteractor
,
factory
:
RocketChatClientFactory
)
{
private
val
client
:
RocketChatClient
=
factory
.
create
(
serverInteractor
.
get
()
!!
)
...
...
@@ -265,32 +261,4 @@ class ChatRoomsPresenter @Inject constructor(private val view: ChatRoomsView,
client
.
removeStateChannel
(
stateChannel
)
client
.
disconnect
()
}
/**
* Logout from current server.
*/
fun
logout
()
{
launchUI
(
strategy
)
{
try
{
clearTokens
()
client
.
logout
()
//TODO: Add the code to unsubscribe to all subscriptions.
client
.
disconnect
()
view
.
onLogout
()
}
catch
(
e
:
RocketChatException
)
{
Timber
.
e
(
e
)
view
.
showMessage
(
e
.
message
!!
)
}
}
}
private
suspend
fun
clearTokens
()
{
serverInteractor
.
clear
()
val
pushToken
=
localRepository
.
get
(
LocalRepository
.
KEY_PUSH_TOKEN
)
if
(
pushToken
!=
null
)
{
client
.
unregisterPushToken
(
pushToken
)
localRepository
.
clear
(
LocalRepository
.
KEY_PUSH_TOKEN
)
}
localRepository
.
clearAllFromServer
(
currentServer
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/presentation/ChatRoomsView.kt
View file @
b6b8ada6
...
...
@@ -9,7 +9,7 @@ interface ChatRoomsView : LoadingView, MessageView {
/**
* Shows the chat rooms.
*
* @param
dataSet The
data set to show.
* @param
newDataSet The new
data set to show.
*/
suspend
fun
updateChatRooms
(
newDataSet
:
List
<
ChatRoom
>)
...
...
@@ -17,9 +17,4 @@ interface ChatRoomsView : LoadingView, MessageView {
* Shows no chat rooms to display.
*/
fun
showNoChatRoomsToDisplay
()
/**
* User has successfully logged out from the current server.
**/
fun
onLogout
()
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsAdapter.kt
View file @
b6b8ada6
...
...
@@ -2,6 +2,7 @@ package chat.rocket.android.chatrooms.ui
import
DateTimeHelper
import
android.content.Context
import
android.support.v4.content.res.ResourcesCompat
import
android.support.v7.widget.RecyclerView
import
android.view.View
import
android.view.ViewGroup
...
...
@@ -43,6 +44,12 @@ class ChatRoomsAdapter(private val context: Context,
bindLastMessage
(
chatRoom
,
text_last_message
)
bindUnreadMessages
(
chatRoom
,
text_total_unread_messages
)
if
(
chatRoom
.
alert
||
chatRoom
.
unread
>
0
)
{
text_chat_name
.
alpha
=
1F
text_last_message_date_time
.
setTextColor
(
ResourcesCompat
.
getColor
(
resources
,
R
.
color
.
colorAccent
,
null
))
text_last_message
.
setTextColor
(
ResourcesCompat
.
getColor
(
resources
,
android
.
R
.
color
.
primary_text_light
,
null
))
}
setOnClickListener
{
listener
(
chatRoom
)
}
}
...
...
app/src/main/java/chat/rocket/android/chatrooms/ui/ChatRoomsFragment.kt
View file @
b6b8ada6
package
chat.rocket.android.chatrooms.ui
import
android.content.Intent
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.support.v7.app.AppCompatActivity
...
...
@@ -10,7 +9,6 @@ import android.support.v7.widget.LinearLayoutManager
import
android.support.v7.widget.SearchView
import
android.view.*
import
chat.rocket.android.R
import
chat.rocket.android.authentication.ui.AuthenticationActivity
import
chat.rocket.android.chatrooms.presentation.ChatRoomsPresenter
import
chat.rocket.android.chatrooms.presentation.ChatRoomsView
import
chat.rocket.android.util.extensions.inflate
...
...
@@ -72,13 +70,6 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
})
}
override
fun
onOptionsItemSelected
(
item
:
MenuItem
?):
Boolean
{
when
(
item
?.
itemId
)
{
R
.
id
.
action_logout
->
presenter
.
logout
()
}
return
true
}
override
suspend
fun
updateChatRooms
(
newDataSet
:
List
<
ChatRoom
>)
{
activity
.
apply
{
launch
(
UI
)
{
...
...
@@ -105,15 +96,6 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
override
fun
showGenericErrorMessage
()
=
showMessage
(
getString
(
R
.
string
.
msg_generic_error
))
override
fun
onLogout
()
{
activity
?.
apply
{
finish
()
val
intent
=
Intent
(
this
,
AuthenticationActivity
::
class
.
java
)
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
or
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
startActivity
(
intent
)
}
}
private
fun
setupToolbar
()
{
(
activity
as
AppCompatActivity
).
supportActionBar
?.
title
=
getString
(
R
.
string
.
title_chats
)
}
...
...
@@ -121,7 +103,9 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
private
fun
setupRecyclerView
()
{
activity
?.
apply
{
recycler_view
.
layoutManager
=
LinearLayoutManager
(
this
,
LinearLayoutManager
.
VERTICAL
,
false
)
recycler_view
.
addItemDecoration
(
DividerItemDecoration
(
this
,
144
,
32
))
recycler_view
.
addItemDecoration
(
DividerItemDecoration
(
this
,
resources
.
getDimensionPixelSize
(
R
.
dimen
.
divider_item_decorator_bound_start
),
resources
.
getDimensionPixelSize
(
R
.
dimen
.
divider_item_decorator_bound_end
)))
recycler_view
.
itemAnimator
=
DefaultItemAnimator
()
recycler_view
.
adapter
=
ChatRoomsAdapter
(
this
)
{
chatRoom
->
presenter
.
loadChatRoom
(
chatRoom
)
...
...
@@ -157,4 +141,4 @@ class ChatRoomsFragment : Fragment(), ChatRoomsView {
return
newRooms
[
newItemPosition
]
}
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/dagger/module/ActivityBuilder.kt
View file @
b6b8ada6
...
...
@@ -13,6 +13,8 @@ import chat.rocket.android.chatroom.ui.PinnedMessagesActivity
import
chat.rocket.android.chatrooms.di.ChatRoomsFragmentProvider
import
chat.rocket.android.chatrooms.di.ChatRoomsModule
import
chat.rocket.android.dagger.scope.PerActivity
import
chat.rocket.android.main.di.MainActivityProvider
import
chat.rocket.android.main.di.MainModule
import
chat.rocket.android.main.ui.MainActivity
import
chat.rocket.android.profile.di.ProfileFragmentProvider
import
dagger.Module
...
...
@@ -31,7 +33,12 @@ abstract class ActivityBuilder {
abstract
fun
bindAuthenticationActivity
():
AuthenticationActivity
@PerActivity
@ContributesAndroidInjector
(
modules
=
[
ChatRoomsModule
::
class
,
ChatRoomsFragmentProvider
::
class
,
ProfileFragmentProvider
::
class
])
@ContributesAndroidInjector
(
modules
=
[
MainModule
::
class
,
MainActivityProvider
::
class
,
ChatRoomsModule
::
class
,
ChatRoomsFragmentProvider
::
class
,
ProfileFragmentProvider
::
class
])
abstract
fun
bindMainActivity
():
MainActivity
@PerActivity
...
...
app/src/main/java/chat/rocket/android/helper/MessageParser.kt
View file @
b6b8ada6
...
...
@@ -7,6 +7,7 @@ import android.graphics.Color
import
android.graphics.Paint
import
android.graphics.Typeface
import
android.graphics.drawable.Drawable
import
android.support.v4.content.res.ResourcesCompat
import
android.text.Layout
import
android.text.Spannable
import
android.text.Spanned
...
...
@@ -78,8 +79,8 @@ class MessageParser @Inject constructor(val context: Application, private val co
val
user
=
matcher
.
group
(
2
)
val
start
=
matcher
.
start
(
2
)
//TODO: should check if username actually exists prior to applying.
val
linkColor
=
context
.
resources
.
getColor
(
R
.
color
.
linkTextColor
)
val
linkBackgroundColor
=
context
.
resources
.
getColor
(
R
.
color
.
linkBackgroundColor
)
val
linkColor
=
ResourcesCompat
.
getColor
(
context
.
resources
,
R
.
color
.
white
,
null
)
val
linkBackgroundColor
=
ResourcesCompat
.
getColor
(
context
.
resources
,
R
.
color
.
colorAccent
,
null
)
val
referSelf
=
currentUser
!=
null
&&
"@$currentUser"
==
user
val
usernameSpan
=
UsernameClickableSpan
(
linkBackgroundColor
,
linkColor
,
referSelf
)
result
.
setSpan
(
usernameSpan
,
start
,
start
+
user
.
length
,
0
)
...
...
app/src/main/java/chat/rocket/android/main/di/MainActivityModule.kt
0 → 100644
View file @
b6b8ada6
package
chat.rocket.android.main.di
import
android.arch.lifecycle.LifecycleOwner
import
chat.rocket.android.core.lifecycle.CancelStrategy
import
chat.rocket.android.main.presentation.MainView
import
chat.rocket.android.main.ui.MainActivity
import
dagger.Module
import
dagger.Provides
import
kotlinx.coroutines.experimental.Job
@Module
class
MainActivityModule
{
// @Provides
// fun provideMainView(activity: MainActivity): MainView = activity
@Provides
fun
provideLifecycleOwner
(
activity
:
MainActivity
):
LifecycleOwner
=
activity
@Provides
fun
provideCancelStrategy
(
owner
:
LifecycleOwner
,
jobs
:
Job
):
CancelStrategy
=
CancelStrategy
(
owner
,
jobs
)
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/main/di/MainActivityProvider.kt
0 → 100644
View file @
b6b8ada6
package
chat.rocket.android.main.di
import
chat.rocket.android.main.ui.MainActivity
import
dagger.Module
import
dagger.android.ContributesAndroidInjector
@Module
abstract
class
MainActivityProvider
{
@ContributesAndroidInjector
(
modules
=
[
MainActivityModule
::
class
])
abstract
fun
provideMainActivity
():
MainActivity
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/main/di/MainModule.kt
0 → 100644
View file @
b6b8ada6
package
chat.rocket.android.main.di
import
android.content.Context
import
chat.rocket.android.dagger.scope.PerActivity
import
chat.rocket.android.main.presentation.MainNavigator
import
chat.rocket.android.main.ui.MainActivity
import
dagger.Module
import
dagger.Provides
@Module
class
MainModule
{
@Provides
@PerActivity
fun
provideMainNavigator
(
activity
:
MainActivity
,
context
:
Context
)
=
MainNavigator
(
activity
,
context
)
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/main/presentation/MainNavigator.kt
0 → 100644
View file @
b6b8ada6
package
chat.rocket.android.main.presentation
import
android.content.Context
import
chat.rocket.android.R
import
chat.rocket.android.chatrooms.ui.ChatRoomsFragment
import
chat.rocket.android.main.ui.MainActivity
import
chat.rocket.android.profile.ui.ProfileFragment
import
chat.rocket.android.util.extensions.addFragment
class
MainNavigator
(
internal
val
activity
:
MainActivity
,
internal
val
context
:
Context
)
{
fun
toChatList
()
{
activity
.
addFragment
(
"ChatRoomsFragment"
,
R
.
id
.
fragment_container
)
{
ChatRoomsFragment
.
newInstance
()
}
}
fun
toUserProfile
()
{
activity
.
addFragment
(
"ProfileFragment"
,
R
.
id
.
fragment_container
)
{
ProfileFragment
.
newInstance
()
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/main/presentation/MainPresenter.kt
0 → 100644
View file @
b6b8ada6
package
chat.rocket.android.main.presentation
import
chat.rocket.android.infrastructure.LocalRepository
import
chat.rocket.android.server.domain.GetCurrentServerInteractor
import
chat.rocket.android.server.infraestructure.RocketChatClientFactory
import
chat.rocket.common.RocketChatException
import
chat.rocket.core.RocketChatClient
import
chat.rocket.core.internal.realtime.disconnect
import
chat.rocket.core.internal.rest.unregisterPushToken
import
timber.log.Timber
import
javax.inject.Inject
class
MainPresenter
@Inject
constructor
(
private
val
navigator
:
MainNavigator
,
private
val
serverInteractor
:
GetCurrentServerInteractor
,
private
val
localRepository
:
LocalRepository
,
factory
:
RocketChatClientFactory
)
{
private
val
client
:
RocketChatClient
=
factory
.
create
(
serverInteractor
.
get
()
!!
)
private
val
currentServer
=
serverInteractor
.
get
()
!!
fun
toChatList
()
=
navigator
.
toChatList
()
fun
toUserProfile
()
=
navigator
.
toUserProfile
()
/**
* Logout from current server.
*/
fun
logout
()
{
// TODO: inject CancelStrategy, and MainView.
// launchUI(strategy) {
try
{
// clearTokens()
// client.logout()
//TODO: Add the code to unsubscribe to all subscriptions.
client
.
disconnect
()
// view.onLogout()
}
catch
(
e
:
RocketChatException
)
{
Timber
.
e
(
e
)
// view.showMessage(e.message!!)
}
// }
}
private
suspend
fun
clearTokens
()
{
serverInteractor
.
clear
()
val
pushToken
=
localRepository
.
get
(
LocalRepository
.
KEY_PUSH_TOKEN
)
if
(
pushToken
!=
null
)
{
client
.
unregisterPushToken
(
pushToken
)
localRepository
.
clear
(
LocalRepository
.
KEY_PUSH_TOKEN
)
}
localRepository
.
clearAllFromServer
(
currentServer
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/main/presentation/MainView.kt
0 → 100644
View file @
b6b8ada6
package
chat.rocket.android.main.presentation
import
chat.rocket.android.core.behaviours.MessageView
interface
MainView
:
MessageView
{
/**
* User has successfully logged out from the current server.
**/
fun
onLogout
()
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/main/ui/MainActivity.kt
View file @
b6b8ada6
package
chat.rocket.android.main.ui
import
android.content.Intent
import
android.os.Bundle
import
android.support.v4.app.Fragment
import
android.support.v7.app.AppCompatActivity
import
android.view.Gravity
import
android.view.MenuItem
import
chat.rocket.android.R
import
chat.rocket.android.chatrooms.ui.ChatRoomsFragment
import
chat.rocket.android.profile.ui.ProfileFragment
import
chat.rocket.android.util.extensions.addFragment
import
chat.rocket.android.authentication.ui.AuthenticationActivity
import
chat.rocket.android.main.presentation.MainPresenter
import
chat.rocket.android.main.presentation.MainView
import
chat.rocket.android.util.extensions.showToast
import
dagger.android.AndroidInjection
import
dagger.android.AndroidInjector
import
dagger.android.DispatchingAndroidInjector
...
...
@@ -17,8 +19,9 @@ import kotlinx.android.synthetic.main.activity_main.*
import
kotlinx.android.synthetic.main.app_bar.*
import
javax.inject.Inject
class
MainActivity
:
AppCompatActivity
(),
HasSupportFragmentInjector
{
class
MainActivity
:
AppCompatActivity
(),
MainView
,
HasSupportFragmentInjector
{
@Inject
lateinit
var
fragmentDispatchingAndroidInjector
:
DispatchingAndroidInjector
<
Fragment
>
@Inject
lateinit
var
presenter
:
MainPresenter
private
var
isFragmentAdded
:
Boolean
=
false
override
fun
onCreate
(
savedInstanceState
:
Bundle
?)
{
...
...
@@ -33,12 +36,24 @@ class MainActivity : AppCompatActivity(), HasSupportFragmentInjector {
override
fun
onResume
()
{
super
.
onResume
()
if
(!
isFragmentAdded
)
{
// Adding the first fragment.
addFragment
(
"ChatRoomsFragment"
)
presenter
.
toChatList
()
isFragmentAdded
=
true
}
}
override
fun
onLogout
()
{
finish
()
val
intent
=
Intent
(
this
,
AuthenticationActivity
::
class
.
java
)
intent
.
addFlags
(
Intent
.
FLAG_ACTIVITY_CLEAR_TASK
or
Intent
.
FLAG_ACTIVITY_NEW_TASK
)
startActivity
(
intent
)
}
override
fun
showMessage
(
resId
:
Int
)
=
showToast
(
resId
)
override
fun
showMessage
(
message
:
String
)
=
showToast
(
message
)
override
fun
showGenericErrorMessage
()
=
showMessage
(
getString
(
R
.
string
.
msg_generic_error
))
override
fun
supportFragmentInjector
():
AndroidInjector
<
Fragment
>
=
fragmentDispatchingAndroidInjector
private
fun
setupToolbar
()
{
...
...
@@ -61,21 +76,14 @@ class MainActivity : AppCompatActivity(), HasSupportFragmentInjector {
private
fun
onNavDrawerItemSelected
(
menuItem
:
MenuItem
)
{
when
(
menuItem
.
itemId
)
{
R
.
id
.
action_chat_rooms
->
{
addFragment
(
"ChatRoomsFragment"
,
R
.
id
.
fragment_container
)
{
ChatRoomsFragment
.
newInstance
()
}
presenter
.
toChatList
()
}
R
.
id
.
action_profile
->
{
addFragment
(
"ProfileFragment"
,
R
.
id
.
fragment_container
)
{
ProfileFragment
.
newInstance
()
}
presenter
.
toUserProfile
()
}
R
.
id
.
action_logout
->
{
presenter
.
logout
()
}
}
}
private
fun
addFragment
(
tag
:
String
)
{
addFragment
(
tag
,
R
.
id
.
fragment_container
)
{
ChatRoomsFragment
.
newInstance
()
}
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/util/extensions/Animation.kt
View file @
b6b8ada6
...
...
@@ -5,7 +5,7 @@ import android.view.ViewAnimationUtils
import
android.view.animation.AccelerateInterpolator
import
android.view.animation.DecelerateInterpolator
fun
View
.
rotateBy
(
value
:
Float
,
duration
:
Long
=
2
00
)
{
fun
View
.
rotateBy
(
value
:
Float
,
duration
:
Long
=
1
00
)
{
animate
()
.
rotationBy
(
value
)
.
setDuration
(
duration
)
...
...
@@ -42,7 +42,7 @@ fun View.fadeOut(startValue: Float, finishValue: Float, duration: Long = 200) {
setVisible
(
false
)
}
fun
View
.
circularRevealOrUnreveal
(
centerX
:
Int
,
centerY
:
Int
,
startRadius
:
Float
,
endRadius
:
Float
,
duration
:
Long
=
6
00
)
{
fun
View
.
circularRevealOrUnreveal
(
centerX
:
Int
,
centerY
:
Int
,
startRadius
:
Float
,
endRadius
:
Float
,
duration
:
Long
=
2
00
)
{
val
anim
=
ViewAnimationUtils
.
createCircularReveal
(
this
,
centerX
,
centerY
,
startRadius
,
endRadius
)
anim
.
duration
=
duration
...
...
app/src/main/java/chat/rocket/android/widget/DividerItemDecoration.kt
View file @
b6b8ada6
...
...
@@ -14,7 +14,7 @@ import android.support.v7.widget.RecyclerView
class
DividerItemDecoration
()
:
RecyclerView
.
ItemDecoration
()
{
private
lateinit
var
divider
:
Drawable
private
var
boundStart
=
0
private
var
bound
Right
=
0
private
var
bound
End
=
0
// Default divider will be used.
constructor
(
context
:
Context
)
:
this
()
{
...
...
@@ -24,15 +24,15 @@ class DividerItemDecoration() : RecyclerView.ItemDecoration() {
styledAttributes
.
recycle
()
}
// Default divider with custom boundaries (start and
right
) will be used.
constructor
(
context
:
Context
,
boundStart
:
Int
,
bound
Right
:
Int
)
:
this
()
{
// Default divider with custom boundaries (start and
end
) will be used.
constructor
(
context
:
Context
,
boundStart
:
Int
,
bound
End
:
Int
)
:
this
()
{
val
attrs
=
intArrayOf
(
android
.
R
.
attr
.
listDivider
)
val
styledAttributes
=
context
.
obtainStyledAttributes
(
attrs
)
divider
=
styledAttributes
.
getDrawable
(
0
)
styledAttributes
.
recycle
()
this
.
boundStart
=
boundStart
this
.
bound
Right
=
boundRight
this
.
bound
End
=
boundEnd
}
// Custom divider will be used.
...
...
@@ -45,7 +45,7 @@ class DividerItemDecoration() : RecyclerView.ItemDecoration() {
override
fun
onDraw
(
c
:
Canvas
,
parent
:
RecyclerView
,
state
:
RecyclerView
.
State
)
{
val
left
=
parent
.
paddingLeft
+
boundStart
val
right
=
(
parent
.
width
-
parent
.
paddingRight
)
-
bound
Right
val
right
=
(
parent
.
width
-
parent
.
paddingRight
)
-
bound
End
val
childCount
=
parent
.
childCount
for
(
i
in
0
until
childCount
)
{
...
...
app/src/main/res/anim/close_enter.xml
View file @
b6b8ada6
...
...
@@ -6,13 +6,15 @@
android:fillEnabled=
"true"
android:shareInterpolator=
"false"
android:zAdjustment=
"top"
>
<alpha
android:duration=
"
25
0"
android:duration=
"
10
0"
android:fromAlpha=
"0.2"
android:interpolator=
"@anim/accelerate_cubic"
android:toAlpha=
"1.0"
/>
<scale
android:duration=
"
25
0"
android:duration=
"
10
0"
android:fromXScale=
"0.9"
android:fromYScale=
"0.9"
android:interpolator=
"@anim/accelerate_cubic"
...
...
@@ -20,4 +22,5 @@
android:pivotY=
"50.0%p"
android:toXScale=
"1.0"
android:toYScale=
"1.0"
/>
</set>
\ No newline at end of file
app/src/main/res/anim/close_exit.xml
View file @
b6b8ada6
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:zAdjustment=
"top"
>
<translate
android:duration=
"
25
0"
android:duration=
"
10
0"
android:fromXDelta=
"0.0%p"
android:interpolator=
"@anim/accelerate_cubic"
android:toXDelta=
"100.0%p"
/>
</set>
\ No newline at end of file
app/src/main/res/anim/open_enter.xml
View file @
b6b8ada6
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:zAdjustment=
"top"
>
<translate
android:duration=
"
25
0"
android:duration=
"
10
0"
android:fromXDelta=
"100.0%p"
android:interpolator=
"@anim/decelerate_cubic"
android:toXDelta=
"0.0%p"
/>
</set>
\ No newline at end of file
app/src/main/res/anim/open_exit.xml
View file @
b6b8ada6
...
...
@@ -6,13 +6,15 @@
android:fillEnabled=
"true"
android:shareInterpolator=
"false"
android:zAdjustment=
"normal"
>
<alpha
android:duration=
"
25
0"
android:duration=
"
10
0"
android:fromAlpha=
"1.0"
android:interpolator=
"@anim/decelerate_cubic"
android:toAlpha=
"0.2"
/>
<scale
android:duration=
"
25
0"
android:duration=
"
10
0"
android:fromXScale=
"1.0"
android:fromYScale=
"1.0"
android:interpolator=
"@anim/decelerate_cubic"
...
...
@@ -20,4 +22,5 @@
android:pivotY=
"50.0%p"
android:toXScale=
"0.9"
android:toYScale=
"0.9"
/>
</set>
\ No newline at end of file
app/src/main/res/drawable/ic_exit_to_app_black_24dp.xml
0 → 100644
View file @
b6b8ada6
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportHeight=
"24.0"
android:viewportWidth=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M10.09,15.59L11.5,17l5,-5 -5,-5 -1.41,1.41L12.67,11H3v2h9.67l-2.58,2.59zM19,3H5c-1.11,0 -2,0.9 -2,2v4h2V5h14v14H5v-4H3v4c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"
/>
</vector>
\ No newline at end of file
app/src/main/res/drawable/ic_settings_black_24dp.xml
0 → 100644
View file @
b6b8ada6
<vector
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:width=
"24dp"
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"
/>
</vector>
app/src/main/res/drawable/style_message_file_upload_content_bg.xml
deleted
100644 → 0
View file @
6021c1f2
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/colorBackgroundContentFileAttachment"
/>
<corners
android:radius=
"6dp"
/>
<stroke
android:width=
"2dp"
android:color=
"@color/colorDrawableTintGrey"
/>
</shape>
\ No newline at end of file
app/src/main/res/drawable/style_message_file_upload_layout_bg.xml
deleted
100644 → 0
View file @
6021c1f2
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:shape=
"rectangle"
>
<solid
android:color=
"@color/colorBackgroundFileAttachment"
/>
<corners
android:radius=
"6dp"
/>
</shape>
\ No newline at end of file
app/src/main/res/layout/fragment_authentication_log_in.xml
View file @
b6b8ada6
...
...
@@ -15,7 +15,7 @@
<TextView
android:id=
"@+id/text_headline"
style=
"@style/
Headline
TextView"
style=
"@style/
Authentication.Headline.
TextView"
android:text=
"@string/title_log_in"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
...
...
@@ -23,7 +23,7 @@
<EditText
android:id=
"@+id/text_username_or_email"
style=
"@style/
EditText.Authentication
"
style=
"@style/
Authentication.EditText
"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_assignment_ind_black_24dp"
android:hint=
"@string/msg_username_or_email"
...
...
@@ -35,7 +35,7 @@
<EditText
android:id=
"@+id/text_password"
style=
"@style/
EditText.Authentication
"
style=
"@style/
Authentication.EditText
"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_lock_black_24dp"
android:hint=
"@string/msg_password"
...
...
@@ -193,7 +193,7 @@
<Button
android:id=
"@+id/button_log_in"
style=
"@style/AuthenticationButton"
style=
"@style/Authentication
.
Button"
android:text=
"@string/title_log_in"
android:visibility=
"visible"
app:layout_constraintBottom_toBottomOf=
"parent"
...
...
app/src/main/res/layout/fragment_authentication_server.xml
View file @
b6b8ada6
...
...
@@ -10,13 +10,13 @@
<TextView
android:id=
"@+id/text_headline"
style=
"@style/
Headline
TextView"
style=
"@style/
Authentication.Headline.
TextView"
android:layout_centerHorizontal=
"true"
android:text=
"@string/title_sign_in_your_server"
/>
<TextView
android:id=
"@+id/text_server_protocol"
style=
"@style/Authentication
Label
"
style=
"@style/Authentication
.TextView
"
android:layout_below=
"@id/text_headline"
android:layout_marginTop=
"32dp"
android:gravity=
"center_vertical"
...
...
@@ -24,7 +24,7 @@
<EditText
android:id=
"@+id/text_server_url"
style=
"@style/
EditText.Authentication
"
style=
"@style/
Authentication.EditText
"
android:layout_below=
"@id/text_headline"
android:layout_marginStart=
"0dp"
android:layout_marginTop=
"32dp"
...
...
@@ -48,7 +48,7 @@
<Button
android:id=
"@+id/button_connect"
style=
"@style/AuthenticationButton"
style=
"@style/Authentication
.
Button"
android:layout_alignParentBottom=
"true"
android:text=
"@string/action_connect"
/>
...
...
app/src/main/res/layout/fragment_authentication_sign_up.xml
View file @
b6b8ada6
...
...
@@ -9,7 +9,7 @@
<TextView
android:id=
"@+id/text_headline"
style=
"@style/
Headline
TextView"
style=
"@style/
Authentication.Headline.
TextView"
android:text=
"@string/title_sign_up"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
...
...
@@ -17,7 +17,7 @@
<EditText
android:id=
"@+id/text_name"
style=
"@style/
EditText.Authentication
"
style=
"@style/
Authentication.EditText
"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_person_black_24dp"
android:hint=
"@string/msg_name"
...
...
@@ -29,7 +29,7 @@
<EditText
android:id=
"@+id/text_username"
style=
"@style/
EditText.Authentication
"
style=
"@style/
Authentication.EditText
"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_at_black_24dp"
android:hint=
"@string/msg_username"
...
...
@@ -41,7 +41,7 @@
<EditText
android:id=
"@+id/text_password"
style=
"@style/
EditText.Authentication
"
style=
"@style/
Authentication.EditText
"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_lock_black_24dp"
android:hint=
"@string/msg_password"
...
...
@@ -53,7 +53,7 @@
<EditText
android:id=
"@+id/text_email"
style=
"@style/
EditText.Authentication
"
style=
"@style/
Authentication.EditText
"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_email_black_24dp"
android:hint=
"@string/msg_email"
...
...
@@ -91,7 +91,7 @@
<Button
android:id=
"@+id/button_sign_up"
style=
"@style/AuthenticationButton"
style=
"@style/Authentication
.
Button"
android:text=
"@string/title_sign_up"
app:layout_constraintBottom_toBottomOf=
"parent"
/>
...
...
app/src/main/res/layout/fragment_authentication_two_fa.xml
View file @
b6b8ada6
...
...
@@ -8,13 +8,13 @@
<TextView
android:id=
"@+id/text_headline"
style=
"@style/
Headline
TextView"
style=
"@style/
Authentication.Headline.
TextView"
android:layout_centerHorizontal=
"true"
android:text=
"@string/title_log_in"
/>
<EditText
android:id=
"@+id/text_two_factor_auth"
style=
"@style/
EditText.Authentication
"
style=
"@style/
Authentication.EditText
"
android:layout_below=
"@id/text_headline"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_vpn_key_black_24dp"
...
...
@@ -31,10 +31,9 @@
app:indicatorName=
"BallPulseIndicator"
tools:visibility=
"visible"
/>
<Button
android:id=
"@+id/button_log_in"
style=
"@style/AuthenticationButton"
style=
"@style/Authentication
.
Button"
android:layout_alignParentBottom=
"true"
android:text=
"@string/title_log_in"
/>
...
...
app/src/main/res/layout/fragment_profile.xml
View file @
b6b8ada6
...
...
@@ -25,7 +25,7 @@
<EditText
android:id=
"@+id/text_name"
style=
"@style/
EditText.Profile
"
style=
"@style/
Profile.EditText
"
android:layout_marginTop=
"32dp"
android:drawableStart=
"@drawable/ic_person_black_24dp"
android:hint=
"@string/msg_name"
...
...
@@ -33,7 +33,7 @@
<EditText
android:id=
"@+id/text_username"
style=
"@style/
EditText.Profile
"
style=
"@style/
Profile.EditText
"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_at_black_24dp"
android:hint=
"@string/msg_username"
...
...
@@ -41,7 +41,7 @@
<EditText
android:id=
"@+id/text_email"
style=
"@style/
EditText.Profile
"
style=
"@style/
Profile.EditText
"
android:layout_marginTop=
"16dp"
android:drawableStart=
"@drawable/ic_email_black_24dp"
android:hint=
"@string/msg_email"
...
...
app/src/main/res/layout/item_chat.xml
View file @
b6b8ada6
...
...
@@ -14,76 +14,71 @@
layout=
"@layout/avatar"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
a
pp:layout_constraintBottom_toBottomOf=
"parent
"
a
ndroid:layout_marginTop=
"6dp
"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@+id/middle_container"
app:layout_constraintTop_toTopOf=
"parent"
/>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/
middle
_container"
android:id=
"@+id/
top
_container"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"16dp"
android:layout_marginStart=
"16dp"
app:layout_constraintLeft_toRightOf=
"@+id/layout_avatar"
app:layout_constraintRight_to
LeftOf=
"@+id/right_container
"
>
app:layout_constraintRight_to
RightOf=
"parent
"
>
<TextView
android:id=
"@+id/text_chat_name"
style=
"@style/
TextAppearance.AppCompat.Title
"
android:layout_width=
"
wrap_content
"
style=
"@style/
ChatRoom.Name.TextView
"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
android:drawablePadding=
"5dp"
android:ellipsize=
"end"
android:maxLines=
"1"
android:alpha=
"0.6"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@+id/text_last_message_date_time"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"General"
/>
<TextView
android:id=
"@+id/text_last_message"
android:layout_width=
"0dp"
android:id=
"@+id/text_last_message_date_time"
style=
"@style/Timestamp.TextView"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"2"
app:layout_constraintTop_toBottomOf=
"@+id/text_chat_name"
tools:text=
"You: Type something"
/>
android:layout_marginStart=
"5dp"
app:layout_constraintBaseline_toBaselineOf=
"@+id/text_chat_name"
app:layout_constraintLeft_toRightOf=
"@+id/text_chat_name"
app:layout_constraintRight_toRightOf=
"parent"
tools:text=
"11:45 AM"
/>
</android.support.constraint.ConstraintLayout>
<android.support.constraint.ConstraintLayout
android:id=
"@+id/
right
_container"
android:layout_width=
"
wrap_content
"
android:id=
"@+id/
bottom
_container"
android:layout_width=
"
0dp
"
android:layout_height=
"wrap_content"
app:layout_constraintRight_toRightOf=
"parent"
>
android:layout_marginStart=
"16dp"
android:layout_marginTop=
"2dp"
app:layout_constraintLeft_toRightOf=
"@+id/layout_avatar"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@+id/top_container"
>
<TextView
android:id=
"@+id/text_last_message_date_time"
style=
"@style/TextAppearance.AppCompat.Caption"
android:layout_width=
"wrap_content"
android:id=
"@+id/text_last_message"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
app:layout_constraintBottom_toTopOf=
"@+id/guideline_one"
app:layout_constraintRight_toRightOf=
"@+id/layout_unread_messages_badge"
tools:text=
"11:45"
/>
android:ellipsize=
"end"
android:maxLines=
"2"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toLeftOf=
"@+id/layout_unread_messages_badge"
app:layout_constraintTop_toTopOf=
"parent"
tools:text=
"You: Type something"
/>
<include
android:id=
"@+id/layout_unread_messages_badge"
layout=
"@layout/unread_messages_badge"
android:layout_width=
"20dp"
android:layout_height=
"20dp"
app:layout_constraintBottom_toTopOf=
"@+id/guideline_two"
android:layout_width=
"18dp"
android:layout_height=
"18dp"
android:layout_marginStart=
"5dp"
app:layout_constraintBottom_toBottomOf=
"parent"
app:layout_constraintLeft_toRightOf=
"@+id/text_last_message"
app:layout_constraintRight_toRightOf=
"parent"
/>
<android.support.constraint.Guideline
android:id=
"@+id/guideline_one"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:layout_constraintGuide_begin=
"22dp"
/>
<android.support.constraint.Guideline
android:id=
"@+id/guideline_two"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"horizontal"
app:layout_constraintGuide_begin=
"48dp"
/>
</android.support.constraint.ConstraintLayout>
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/item_message.xml
View file @
b6b8ada6
...
...
@@ -14,7 +14,7 @@
layout=
"@layout/avatar"
android:layout_width=
"40dp"
android:layout_height=
"40dp"
android:layout_marginTop=
"
7
dp"
android:layout_marginTop=
"
5
dp"
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
/>
...
...
@@ -28,25 +28,23 @@
<TextView
android:id=
"@+id/text_sender"
style=
"@style/
TextAppearance.AppCompat.Title
"
style=
"@style/
Sender.Name.TextView
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:ellipsize=
"end"
android:maxLines=
"1"
tools:text=
"Ronald Perkins"
/>
<TextView
android:id=
"@+id/text_message_time"
style=
"@style/T
extAppearance.AppCompat.Caption
"
style=
"@style/T
imestamp.TextView
"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"10dp"
tools:text=
"11:45
pm
"
/>
tools:text=
"11:45
PM
"
/>
</LinearLayout>
<TextView
android:id=
"@+id/text_content"
style=
"@style/
TextAppearance.AppCompat.Subhead
"
style=
"@style/
Message.TextView
"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
...
...
app/src/main/res/layout/message_attachment.xml
View file @
b6b8ada6
...
...
@@ -7,22 +7,6 @@
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/text_file_attachment"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:background=
"@drawable/style_message_file_upload_content_bg"
android:drawablePadding=
"10dp"
android:drawableStart=
"@drawable/ic_files_24dp"
android:ellipsize=
"end"
android:gravity=
"center"
android:maxLength=
"20"
android:maxLines=
"1"
android:padding=
"5dp"
android:visibility=
"gone"
tools:text=
"brazilian_anthem.mp4"
tools:visibility=
"visible"
/>
<com.facebook.drawee.view.SimpleDraweeView
android:id=
"@+id/image_attachment"
android:layout_width=
"match_parent"
...
...
app/src/main/res/layout/unread_messages_badge.xml
View file @
b6b8ada6
...
...
@@ -7,8 +7,8 @@
<TextView
android:id=
"@+id/text_total_unread_messages"
style=
"@style/TextAppearance.AppCompat.Caption"
android:layout_width=
"
20
dp"
android:layout_height=
"
20
dp"
android:layout_width=
"
18
dp"
android:layout_height=
"
18
dp"
android:background=
"@drawable/style_total_unread_messages"
android:gravity=
"center"
android:textColor=
"@color/white"
...
...
app/src/main/res/menu/chatrooms.xml
View file @
b6b8ada6
...
...
@@ -9,9 +9,4 @@
app:actionViewClass=
"android.support.v7.widget.SearchView"
app:showAsAction=
"ifRoom|collapseActionView"
/>
<item
android:id=
"@+id/action_logout"
android:title=
"@string/action_logout"
app:showAsAction=
"never"
/>
</menu>
\ No newline at end of file
app/src/main/res/menu/navigation.xml
View file @
b6b8ada6
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<group
android:checkableBehavior=
"single"
>
<group
android:id=
"@+id/menu_section_1"
android:checkableBehavior=
"single"
>
<item
android:id=
"@+id/action_chat_rooms"
android:checked=
"true"
...
...
@@ -13,4 +17,19 @@
android:title=
"@string/title_profile"
/>
</group>
<group
android:id=
"@+id/menu_section_2"
android:checkableBehavior=
"none"
>
<item
android:id=
"@+id/action_settings"
android:icon=
"@drawable/ic_settings_black_24dp"
android:title=
"@string/action_settings"
/>
<item
android:id=
"@+id/action_logout"
android:icon=
"@drawable/ic_exit_to_app_black_24dp"
android:title=
"@string/action_logout"
/>
</group>
</menu>
\ No newline at end of file
app/src/main/res/values-pt-rBR/strings.xml
View file @
b6b8ada6
...
...
@@ -15,6 +15,7 @@
<string
name=
"action_privacy_policy"
>
Política de Privacidade
</string>
<string
name=
"action_search"
>
Pesquisar
</string>
<string
name=
"action_update"
>
Atualizar
</string>
<string
name=
"action_settings"
>
Configurações
</string>
<string
name=
"action_logout"
>
Sair
</string>
<string
name=
"action_files"
>
Arquivos
</string>
...
...
app/src/main/res/values/colors.xml
View file @
b6b8ada6
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color
name=
"ic_launcher_background"
>
#15293F
</color>
<!-- Main colors -->
<color
name=
"colorPrimary"
>
#FF303030
</color>
<!-- Material Grey 850 -->
<color
name=
"colorPrimaryDark"
>
#ff212121
</color>
<!-- Material Grey 900 -->
<color
name=
"colorAccent"
>
#FF1976D2
</color>
<!-- Material Blue 700 -->
<color
name=
"ic_launcher_background"
>
#15293F
</color>
<!-- Text colors -->
<color
name=
"colorPrimaryText"
>
#DE000000
</color>
<!-- User status colors -->
<color
name=
"colorUserStatusOnline"
>
#2FE1A8
</color>
<color
name=
"colorUserStatusBusy"
>
#F33E5B
</color>
<color
name=
"colorUserStatusAway"
>
#FDD236
</color>
...
...
@@ -19,9 +24,6 @@
<color
name=
"colorDim"
>
#99000000
</color>
<color
name=
"colorBackgroundFileAttachment"
>
#E2FFC8
</color>
<color
name=
"colorBackgroundContentFileAttachment"
>
#FFD8F5C0
</color>
<color
name=
"white"
>
#FFFFFFFF
</color>
<color
name=
"black"
>
#FF000000
</color>
<color
name=
"red"
>
#FFFF0000
</color>
...
...
app/src/main/res/values/dimens.xml
View file @
b6b8ada6
...
...
@@ -9,6 +9,9 @@
<dimen
name=
"fab_elevation"
>
6dp
</dimen>
<dimen
name=
"divider_item_decorator_bound_start"
>
72dp
</dimen>
<dimen
name=
"divider_item_decorator_bound_end"
>
0dp
</dimen>
<dimen
name=
"message_time_text_size"
>
12sp
</dimen>
<!-- Emoji -->
...
...
app/src/main/res/values/strings.xml
View file @
b6b8ada6
...
...
@@ -16,7 +16,8 @@
<string
name=
"action_privacy_policy"
>
Privacy Policy
</string>
<string
name=
"action_search"
>
Search
</string>
<string
name=
"action_update"
>
Update
</string>
<string
name=
"action_logout"
>
Log Out
</string>
<string
name=
"action_settings"
>
Settings
</string>
<string
name=
"action_logout"
>
Logout
</string>
<string
name=
"action_files"
>
Files
</string>
<!-- Regular information messages -->
...
...
app/src/main/res/values/styles.xml
View file @
b6b8ada6
...
...
@@ -17,7 +17,18 @@
</style>
<!-- Widget styles. -->
<style
name=
"HeadlineTextView"
parent=
"TextAppearance.AppCompat.Headline"
>
<style
name=
"Authentication.TextView"
parent=
"TextAppearance.AppCompat.Medium"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
50dp
</item>
<item
name=
"android:layout_marginStart"
>
@dimen/screen_edge_left_and_right_margins
</item>
<item
name=
"android:paddingStart"
>
@dimen/edit_text_margin
</item>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:drawablePadding"
>
@dimen/edit_text_drawable_padding
</item>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
<item
name=
"android:background"
>
@drawable/style_edit_text_authentication
</item>
</style>
<style
name=
"Authentication.Headline.TextView"
parent=
"TextAppearance.AppCompat.Headline"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:layout_marginTop"
>
20dp
</item>
...
...
@@ -25,7 +36,7 @@
<item
name=
"android:layout_marginEnd"
>
@dimen/screen_edge_left_and_right_margins
</item>
</style>
<style
name=
"
EditText.Authentication
"
parent=
"Widget.AppCompat.EditText"
>
<style
name=
"
Authentication.EditText
"
parent=
"Widget.AppCompat.EditText"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
50dp
</item>
<item
name=
"android:layout_marginStart"
>
@dimen/screen_edge_left_and_right_margins
</item>
...
...
@@ -39,25 +50,35 @@
<item
name=
"android:background"
>
@drawable/style_edit_text_authentication
</item>
</style>
<style
name=
"EditText.Profile"
parent=
"EditText.Authentication"
>
<item
name=
"android:background"
>
@drawable/style_edit_text_profile
</item>
<style
name=
"Authentication.Button"
parent=
"Widget.AppCompat.Button"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:background"
>
@drawable/effect_ripple
</item>
</style>
<style
name=
"AuthenticationLabel"
parent=
"TextAppearance.AppCompat.Medium"
>
<item
name=
"android:layout_width"
>
wrap_content
</item>
<item
name=
"android:layout_height"
>
50dp
</item>
<item
name=
"android:layout_marginStart"
>
@dimen/screen_edge_left_and_right_margins
</item>
<item
name=
"android:paddingStart"
>
@dimen/edit_text_margin
</item>
<style
name=
"ChatRoom.Name.TextView"
parent=
"TextAppearance.AppCompat.Title"
>
<item
name=
"android:ellipsize"
>
end
</item>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:drawablePadding"
>
@dimen/edit_text_drawable_padding
</item>
<item
name=
"android:fontFamily"
>
sans-serif
</item>
<item
name=
"android:background"
>
@drawable/style_edit_text_authentication
</item>
<item
name=
"android:textSize"
>
16sp
</item>
</style>
<style
name=
"AuthenticationButton"
parent=
"Widget.AppCompat.Button"
>
<item
name=
"android:layout_width"
>
match_parent
</item>
<item
name=
"android:layout_height"
>
wrap_content
</item>
<item
name=
"android:background"
>
@drawable/effect_ripple
</item>
<style
name=
"Sender.Name.TextView"
parent=
"TextAppearance.AppCompat.Title"
>
<item
name=
"android:ellipsize"
>
end
</item>
<item
name=
"android:maxLines"
>
1
</item>
<item
name=
"android:textSize"
>
16sp
</item>
</style>
<style
name=
"Message.TextView"
parent=
"android:TextAppearance"
>
<item
name=
"android:textSize"
>
15sp
</item>
<item
name=
"android:textColor"
>
@color/colorPrimaryText
</item>
</style>
<style
name=
"Timestamp.TextView"
parent=
"TextAppearance.AppCompat.Caption"
>
<item
name=
"android:textSize"
>
10sp
</item>
</style>
<style
name=
"Profile.EditText"
parent=
"Authentication.EditText"
>
<item
name=
"android:background"
>
@drawable/style_edit_text_profile
</item>
</style>
</resources>
\ No newline at end of file
dependencies.gradle
View file @
b6b8ada6
...
...
@@ -11,7 +11,7 @@ ext {
// Main dependencies
support
:
'27.0.2'
,
constraintLayout
:
'1.0.2'
,
dagger
:
'2.1
3
'
,
dagger
:
'2.1
4.1
'
,
exoPlayer
:
'2.6.0'
,
playServices
:
'11.8.0'
,
room
:
'1.0.0'
,
...
...
@@ -29,6 +29,7 @@ ext {
markwon
:
'1.0.3'
,
sheetMenu
:
'1.3.3'
,
aVLoadingIndicatorView
:
'2.1.3'
,
swipeBackLayout
:
'1.1.0'
,
// For testing
junit
:
'4.12'
,
...
...
@@ -91,6 +92,8 @@ ext {
aVLoadingIndicatorView
:
"com.wang.avi:library:${versions.aVLoadingIndicatorView}"
,
swipeBackLayout
:
"me.imid.swipebacklayout.lib:library:${versions.swipeBackLayout}"
,
// For testing
junit
:
"junit:junit:$versions.junit"
,
expressoCore
:
"com.android.support.test.espresso:espresso-core:${versions.expresso}"
,
...
...
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