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
aa221c60
Commit
aa221c60
authored
Jan 10, 2017
by
Tiago Cunha
Committed by
Yusuke Iwaki
Jan 11, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The toolbar
parent
dab8c265
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
21 deletions
+8
-21
activity_main.xml
app/src/main/res/layout-w720dp/activity_main.xml
+1
-2
activity_main.xml
app/src/main/res/layout/activity_main.xml
+0
-1
fragment_sidebar_main.xml
app/src/main/res/layout/fragment_sidebar_main.xml
+7
-4
CustomToolbar.java
...c/main/java/chat/rocket/android/widget/CustomToolbar.java
+0
-9
custom_toolbar.xml
...at-android-widgets/src/main/res/layout/custom_toolbar.xml
+0
-1
custom_toolbar_attrs.xml
...roid-widgets/src/main/res/values/custom_toolbar_attrs.xml
+0
-4
No files found.
app/src/main/res/layout-w720dp/activity_main.xml
View file @
aa221c60
...
...
@@ -18,9 +18,8 @@
android:id=
"@+id/activity_main_toolbar"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:
theme=
"@style/ThemeOverlay.AppCompat.Dark.ActionBar
"
android:
background=
"@color/white
"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
app:mode=
"tablet"
app:titleText=
"@string/app_name"
app:titleDrawablePadding=
"@dimen/margin_8"
/>
</android.support.design.widget.AppBarLayout>
...
...
app/src/main/res/layout/activity_main.xml
View file @
aa221c60
...
...
@@ -20,7 +20,6 @@
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/white"
app:mode=
"phone"
app:titleText=
"@string/app_name"
app:titleTextColor=
"@color/titleTextColor"
app:titleDrawablePadding=
"@dimen/margin_8"
...
...
app/src/main/res/layout/fragment_sidebar_main.xml
View file @
aa221c60
...
...
@@ -8,14 +8,17 @@
<LinearLayout
android:id=
"@+id/user_info_container"
android:layout_width=
"match_parent"
android:layout_height=
"
wrap_content
"
android:layout_height=
"
?attr/actionBarSize
"
android:layout_alignParentTop=
"true"
android:background=
"?attr/colorPrimaryDark"
android:elevation=
"2dp"
android:foreground=
"?attr/selectableItemBackground"
android:gravity=
"center_vertical"
android:orientation=
"horizontal"
android:padding=
"@dimen/margin_16"
>
android:paddingBottom=
"@dimen/margin_8"
android:paddingTop=
"@dimen/margin_8"
android:paddingLeft=
"@dimen/margin_16"
android:paddingRight=
"@dimen/margin_16"
>
<ImageView
android:id=
"@+id/current_user_status"
...
...
@@ -29,8 +32,8 @@
<ImageView
android:id=
"@+id/current_user_avatar"
android:layout_width=
"4
8
dp"
android:layout_height=
"4
8
dp"
/>
android:layout_width=
"4
0
dp"
android:layout_height=
"4
0
dp"
/>
<TextView
android:id=
"@+id/current_user_name"
...
...
rocket-chat-android-widgets/src/main/java/chat/rocket/android/widget/CustomToolbar.java
View file @
aa221c60
...
...
@@ -8,7 +8,6 @@ import android.support.annotation.DrawableRes;
import
android.support.annotation.Nullable
;
import
android.support.annotation.StringRes
;
import
android.support.graphics.drawable.VectorDrawableCompat
;
import
android.support.v4.graphics.drawable.DrawableCompat
;
import
android.support.v7.widget.Toolbar
;
import
android.util.AttributeSet
;
import
android.view.View
;
...
...
@@ -16,10 +15,7 @@ import android.widget.TextView;
public
class
CustomToolbar
extends
Toolbar
{
private
static
final
String
TABLET
=
"tablet"
;
private
TextView
titleTextView
;
private
int
mode
;
public
CustomToolbar
(
Context
context
)
{
super
(
context
);
...
...
@@ -56,7 +52,6 @@ public class CustomToolbar extends Toolbar {
.
setTextColor
(
typedArray
.
getColor
(
R
.
styleable
.
CustomToolbar_titleTextColor
,
Color
.
BLACK
));
titleTextView
.
setCompoundDrawablePadding
(
typedArray
.
getLayoutDimension
(
R
.
styleable
.
CustomToolbar_titleDrawablePadding
,
0
));
mode
=
typedArray
.
getInt
(
R
.
styleable
.
CustomToolbar_mode
,
0
);
}
finally
{
typedArray
.
recycle
();
}
...
...
@@ -89,10 +84,6 @@ public class CustomToolbar extends Toolbar {
?
VectorDrawableCompat
.
create
(
getResources
(),
drawableResId
,
null
)
:
null
;
if
(
drawable
!=
null
&&
mode
==
1
)
{
DrawableCompat
.
setTint
(
drawable
,
Color
.
WHITE
);
}
titleTextView
.
setCompoundDrawablesWithIntrinsicBounds
(
drawable
,
null
,
null
,
null
);
}
}
rocket-chat-android-widgets/src/main/res/layout/custom_toolbar.xml
View file @
aa221c60
<?xml version="1.0" encoding="utf-8"?>
<merge
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:orientation=
"vertical"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
...
...
rocket-chat-android-widgets/src/main/res/values/custom_toolbar_attrs.xml
View file @
aa221c60
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable
name=
"CustomToolbar"
>
<attr
name=
"mode"
format=
"enum"
>
<enum
name=
"phone"
value=
"0"
/>
<enum
name=
"tablet"
value=
"1"
/>
</attr>
<attr
name=
"titleText"
format=
"string"
/>
<attr
name=
"titleTextColor"
format=
"color"
/>
<attr
name=
"titleDrawablePadding"
format=
"dimension"
/>
...
...
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