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
f015f0d4
Commit
f015f0d4
authored
Dec 28, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes the user detais UI.
parent
a2f38889
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
160 additions
and
96 deletions
+160
-96
build.gradle
app/build.gradle
+1
-0
UserDetailsFragment.kt
...chat/rocket/android/userdetails/ui/UserDetailsFragment.kt
+18
-4
bg_border_user_details_avatar.xml
app/src/main/res/drawable/bg_border_user_details_avatar.xml
+14
-0
fragment_user_details.xml
app/src/main/res/layout/fragment_user_details.xml
+125
-92
dependencies.gradle
dependencies.gradle
+2
-0
No files found.
app/build.gradle
View file @
f015f0d4
...
...
@@ -140,6 +140,7 @@ dependencies {
implementation
libraries
.
frescoAnimatedWebP
implementation
libraries
.
glide
implementation
libraries
.
glideTransformations
kapt
libraries
.
kotshiCompiler
implementation
libraries
.
kotshiApi
...
...
app/src/main/java/chat/rocket/android/userdetails/ui/UserDetailsFragment.kt
View file @
f015f0d4
...
...
@@ -10,6 +10,7 @@ import chat.rocket.android.R
import
chat.rocket.android.analytics.AnalyticsManager
import
chat.rocket.android.analytics.event.ScreenViewEvent
import
chat.rocket.android.chatroom.ui.ChatRoomActivity
import
chat.rocket.android.emoji.internal.GlideApp
import
chat.rocket.android.userdetails.presentation.UserDetailsPresenter
import
chat.rocket.android.userdetails.presentation.UserDetailsView
import
chat.rocket.android.util.extensions.inflate
...
...
@@ -17,7 +18,12 @@ import chat.rocket.android.util.extensions.setLightStatusBar
import
chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.extensions.ui
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.MultiTransformation
import
com.bumptech.glide.load.resource.bitmap.CenterCrop
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
import
com.bumptech.glide.request.RequestOptions
import
dagger.android.support.AndroidSupportInjection
import
jp.wasabeef.glide.transformations.BlurTransformation
import
kotlinx.android.synthetic.main.app_bar_chat_room.*
import
kotlinx.android.synthetic.main.fragment_user_details.*
import
javax.inject.Inject
...
...
@@ -62,6 +68,7 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
super
.
onViewCreated
(
view
,
savedInstanceState
)
setupToolbar
()
setupListeners
()
presenter
.
loadUserDetails
(
userId
)
analyticsManager
.
logScreenView
(
ScreenViewEvent
.
UserDetails
)
...
...
@@ -74,14 +81,17 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
status
:
String
,
utcOffset
:
String
)
{
Glide
.
with
(
this
)
.
asBitmap
()
.
load
(
avatarUrl
)
val
requestBuilder
=
Glide
.
with
(
this
).
load
(
avatarUrl
)
requestBuilder
.
apply
(
RequestOptions
.
bitmapTransform
(
MultiTransformation
(
BlurTransformation
(),
CenterCrop
())))
.
into
(
image_blur
)
requestBuilder
.
apply
(
RequestOptions
.
bitmapTransform
(
RoundedCorners
(
14
)))
.
into
(
image_avatar
)
text_name
.
text
=
name
text_username
.
text
=
username
text_description_status
.
text
=
status
text_description_status
.
text
=
status
.
substring
(
0
,
1
).
toUpperCase
()
+
status
.
substring
(
1
)
text_description_timezone
.
text
=
utcOffset
// We should also setup the user details listeners.
...
...
@@ -114,4 +124,8 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
toolbar
.
isVisible
=
false
}
}
private
fun
setupListeners
()
{
image_arrow_back
.
setOnClickListener
{
activity
?.
onBackPressed
()
}
}
}
\ No newline at end of file
app/src/main/res/drawable/bg_
round_bounds_white
.xml
→
app/src/main/res/drawable/bg_
border_user_details_avatar
.xml
View file @
f015f0d4
...
...
@@ -3,12 +3,12 @@
android:shape=
"rectangle"
>
<padding
android:bottom=
"
2
dp"
android:left=
"
2
dp"
android:right=
"
2
dp"
android:top=
"
2
dp"
/>
android:bottom=
"
3
dp"
android:left=
"
3
dp"
android:right=
"
3
dp"
android:top=
"
3
dp"
/>
<solid
android:color=
"@
android:color/
white"
/>
<solid
android:color=
"@
color/color_
white"
/>
<corners
android:radius=
"
25px
"
/>
<corners
android:radius=
"
6dp
"
/>
</shape>
app/src/main/res/layout/fragment_user_details.xml
View file @
f015f0d4
This diff is collapsed.
Click to expand it.
dependencies.gradle
View file @
f015f0d4
...
...
@@ -51,6 +51,7 @@ ext {
markwon
:
'2.0.0'
,
aVLoadingIndicatorView:
'2.1.3'
,
glide
:
'4.8.0'
,
glideTransformations
:
'4.0.0'
,
// For wearable
wear
:
'2.3.0'
,
...
...
@@ -118,6 +119,7 @@ ext {
frescoImageViewer
:
"com.github.luciofm:FrescoImageViewer:${versions.frescoImageViewer}"
,
glide
:
"com.github.bumptech.glide:glide:${versions.glide}"
,
glideProcessor
:
"com.github.bumptech.glide:compiler:${versions.glide}"
,
glideTransformations
:
"jp.wasabeef:glide-transformations:${versions.glideTransformations}"
,
markwon
:
"ru.noties:markwon:${versions.markwon}"
,
...
...
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