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
f135794e
Commit
f135794e
authored
Aug 28, 2017
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update RoomToolbar.java
parent
8195ecd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
RoomToolbar.java
...src/main/java/chat/rocket/android/widget/RoomToolbar.java
+17
-5
No files found.
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/RoomToolbar.java
View file @
f135794e
...
@@ -8,6 +8,7 @@ import android.support.annotation.StringRes;
...
@@ -8,6 +8,7 @@ import android.support.annotation.StringRes;
import
android.support.graphics.drawable.VectorDrawableCompat
;
import
android.support.graphics.drawable.VectorDrawableCompat
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v4.content.ContextCompat
;
import
android.support.v4.graphics.drawable.DrawableCompat
;
import
android.support.v4.graphics.drawable.DrawableCompat
;
import
android.support.v7.graphics.drawable.DrawerArrowDrawable
;
import
android.support.v7.widget.AppCompatImageView
;
import
android.support.v7.widget.AppCompatImageView
;
import
android.support.v7.widget.Toolbar
;
import
android.support.v7.widget.Toolbar
;
import
android.util.AttributeSet
;
import
android.util.AttributeSet
;
...
@@ -30,6 +31,8 @@ public class RoomToolbar extends Toolbar {
...
@@ -30,6 +31,8 @@ public class RoomToolbar extends Toolbar {
private
Drawable
publicChannelDrawable
;
private
Drawable
publicChannelDrawable
;
private
Drawable
userStatusDrawable
;
private
Drawable
userStatusDrawable
;
private
DrawerArrowDrawable
drawerArrowDrawable
;
public
static
final
int
STATUS_ONLINE
=
1
;
public
static
final
int
STATUS_ONLINE
=
1
;
public
static
final
int
STATUS_BUSY
=
2
;
public
static
final
int
STATUS_BUSY
=
2
;
public
static
final
int
STATUS_AWAY
=
3
;
public
static
final
int
STATUS_AWAY
=
3
;
...
@@ -52,7 +55,7 @@ public class RoomToolbar extends Toolbar {
...
@@ -52,7 +55,7 @@ public class RoomToolbar extends Toolbar {
private
void
initialize
(
Context
context
)
{
private
void
initialize
(
Context
context
)
{
View
.
inflate
(
context
,
R
.
layout
.
toolbar
,
this
);
View
.
inflate
(
context
,
R
.
layout
.
toolbar
,
this
);
setNavigationIcon
();
setNavigationIcon
(
context
);
toolbarText
=
findViewById
(
R
.
id
.
text_toolbar
);
toolbarText
=
findViewById
(
R
.
id
.
text_toolbar
);
roomTypeImage
=
findViewById
(
R
.
id
.
image_room_type
);
roomTypeImage
=
findViewById
(
R
.
id
.
image_room_type
);
...
@@ -63,9 +66,18 @@ public class RoomToolbar extends Toolbar {
...
@@ -63,9 +66,18 @@ public class RoomToolbar extends Toolbar {
userStatusDrawable
=
VectorDrawableCompat
.
create
(
getResources
(),
R
.
drawable
.
ic_user_status_black_24dp
,
null
);
userStatusDrawable
=
VectorDrawableCompat
.
create
(
getResources
(),
R
.
drawable
.
ic_user_status_black_24dp
,
null
);
}
}
private
void
setNavigationIcon
()
{
private
void
setNavigationIcon
(
Context
context
)
{
Drawable
menuDrawable
=
VectorDrawableCompat
.
create
(
getResources
(),
R
.
drawable
.
ic_menu_white_24dp
,
null
);
drawerArrowDrawable
=
new
DrawerArrowDrawable
(
context
);
super
.
setNavigationIcon
(
menuDrawable
);
drawerArrowDrawable
.
setColor
(
ContextCompat
.
getColor
(
context
,
android
.
R
.
color
.
white
));
super
.
setNavigationIcon
(
drawerArrowDrawable
);
}
public
void
setNavigationIconProgress
(
float
progress
)
{
drawerArrowDrawable
.
setProgress
(
progress
);
}
public
void
setNavigationIconVerticalMirror
(
boolean
verticalMirror
)
{
drawerArrowDrawable
.
setVerticalMirror
(
verticalMirror
);
}
}
@Override
@Override
...
@@ -168,7 +180,7 @@ public class RoomToolbar extends Toolbar {
...
@@ -168,7 +180,7 @@ public class RoomToolbar extends Toolbar {
.
beginConfig
()
.
beginConfig
()
.
useFont
(
Typeface
.
SANS_SERIF
)
.
useFont
(
Typeface
.
SANS_SERIF
)
.
endConfig
()
.
endConfig
()
.
buildRound
(
icon
,
ContextCompat
.
getColor
(
getContext
(),
android
.
R
.
color
.
white
));
.
buildRound
(
icon
,
ContextCompat
.
getColor
(
getContext
(),
R
.
color
.
color_user_status_busy
));
}
}
@Override
@Override
...
...
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