Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xabber-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
xabber-android
Commits
9557d51a
Commit
9557d51a
authored
May 29, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chats and recent chats toolbar made light in tablet mode.
parent
6b2aab89
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
217 additions
and
60 deletions
+217
-60
ChatViewerFragment.java
...c/main/java/com/xabber/android/ui/ChatViewerFragment.java
+1
-1
RecentChatFragment.java
...c/main/java/com/xabber/android/ui/RecentChatFragment.java
+1
-1
AccountPainter.java
...ain/java/com/xabber/android/ui/helper/AccountPainter.java
+11
-0
ContactTitleActionBarInflater.java
...bber/android/ui/helper/ContactTitleActionBarInflater.java
+1
-1
ic_alert_black_24dp.png
app/src/main/res/drawable-hdpi/ic_alert_black_24dp.png
+0
-0
ic_alert_black_24dp.png
app/src/main/res/drawable-mdpi/ic_alert_black_24dp.png
+0
-0
ic_alert_black_24dp.png
app/src/main/res/drawable-xhdpi/ic_alert_black_24dp.png
+0
-0
ic_alert_black_24dp.png
app/src/main/res/drawable-xxhdpi/ic_alert_black_24dp.png
+0
-0
chat_viewer_fragment.xml
app/src/main/res/layout-w820dp/chat_viewer_fragment.xml
+52
-0
recent_chats.xml
app/src/main/res/layout-w820dp/recent_chats.xml
+17
-0
chat_input_panel.xml
app/src/main/res/layout/chat_input_panel.xml
+50
-0
chat_viewer_fragment.xml
app/src/main/res/layout/chat_viewer_fragment.xml
+2
-50
contact_title_dark.xml
app/src/main/res/layout/contact_title_dark.xml
+7
-7
contact_title_light.xml
app/src/main/res/layout/contact_title_light.xml
+52
-0
toolbar_default_light.xml
app/src/main/res/layout/toolbar_default_light.xml
+13
-0
recent_chats.xml
app/src/main/res/menu-w820dp/recent_chats.xml
+10
-0
No files found.
app/src/main/java/com/xabber/android/ui/ChatViewerFragment.java
View file @
9557d51a
...
...
@@ -383,7 +383,7 @@ public class ChatViewerFragment extends Fragment implements PopupMenu.OnMenuItem
private
void
setToolbarColor
()
{
int
toolbarColor
;
if
(
getResources
().
getBoolean
(
R
.
bool
.
tablet_mode
))
{
toolbarColor
=
accountPainter
.
getAccountLightColor
(
account
);
toolbarColor
=
accountPainter
.
getAccountLight
est
Color
(
account
);
}
else
{
toolbarColor
=
accountPainter
.
getAccountMainColor
(
account
);
}
...
...
app/src/main/java/com/xabber/android/ui/RecentChatFragment.java
View file @
9557d51a
...
...
@@ -95,7 +95,7 @@ public class RecentChatFragment extends ListFragment implements Toolbar.OnMenuIt
private
void
setToolbarColor
()
{
int
toolbarColor
;
if
(
getResources
().
getBoolean
(
R
.
bool
.
tablet_mode
))
{
toolbarColor
=
accountPainter
.
getDefaultLightColor
();
toolbarColor
=
accountPainter
.
getDefaultLight
est
Color
();
}
else
{
toolbarColor
=
accountPainter
.
getDefaultMainColor
();
}
...
...
app/src/main/java/com/xabber/android/ui/helper/AccountPainter.java
View file @
9557d51a
...
...
@@ -97,6 +97,15 @@ public class AccountPainter {
}
}
public
int
getDefaultLightestColor
()
{
String
firstAccount
=
getFirstAccount
();
if
(
firstAccount
==
null
)
{
return
themeMainColor
;
}
else
{
return
getAccountLightestColor
(
firstAccount
);
}
}
public
int
getAccountDarkColor
(
String
account
)
{
return
accountDarkColors
[
getAccountColorLevel
(
account
)];
}
...
...
@@ -139,4 +148,6 @@ public class AccountPainter {
}
return
null
;
}
}
app/src/main/java/com/xabber/android/ui/helper/ContactTitleActionBarInflater.java
View file @
9557d51a
...
...
@@ -33,7 +33,7 @@ public class ContactTitleActionBarInflater {
actionBar
.
setDisplayShowHomeEnabled
(
false
);
actionBar
.
setDisplayHomeAsUpEnabled
(
true
);
actionBarView
=
LayoutInflater
.
from
(
activity
).
inflate
(
R
.
layout
.
contact_title
,
null
);
actionBarView
=
LayoutInflater
.
from
(
activity
).
inflate
(
R
.
layout
.
contact_title
_dark
,
null
);
actionBar
.
setCustomView
(
actionBarView
,
new
ActionBar
.
LayoutParams
(
ActionBar
.
LayoutParams
.
MATCH_PARENT
,
ActionBar
.
LayoutParams
.
MATCH_PARENT
));
...
...
app/src/main/res/drawable-hdpi/ic_alert_black_24dp.png
0 → 100644
View file @
9557d51a
436 Bytes
app/src/main/res/drawable-mdpi/ic_alert_black_24dp.png
0 → 100644
View file @
9557d51a
333 Bytes
app/src/main/res/drawable-xhdpi/ic_alert_black_24dp.png
0 → 100644
View file @
9557d51a
494 Bytes
app/src/main/res/drawable-xxhdpi/ic_alert_black_24dp.png
0 → 100644
View file @
9557d51a
689 Bytes
app/src/main/res/layout-w820dp/chat_viewer_fragment.xml
0 → 100644
View file @
9557d51a
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013, Redsolution LTD. All rights reserved.
This file is part of Xabber project; you can redistribute it and/or
modify it under the terms of the GNU General Public License, Version 3.
Xabber is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License,
along with this program. If not, see http://www.gnu.org/licenses/.
-->
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<android.support.v7.widget.Toolbar
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/toolbar_default"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
android:elevation=
"8dp"
android:theme=
"@style/ThemeOverlay.AppCompat.Light"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
>
<include
android:id=
"@+id/contact_title"
layout=
"@layout/contact_title_light"
/>
</android.support.v7.widget.Toolbar>
<android.support.v7.widget.RecyclerView
android:id=
"@+id/chat_messages_recycler_view"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_above=
"@+id/input_layout"
android:layout_below=
"@+id/toolbar_default"
android:divider=
"@null"
android:dividerHeight=
"0dp"
android:listSelector=
"@android:color/transparent"
android:scrollbars=
"vertical"
tools:listitem=
"@layout/chat_viewer_outgoing_message"
/>
<include
layout=
"@layout/chat_input_panel"
/>
</RelativeLayout>
app/src/main/res/layout-w820dp/recent_chats.xml
0 → 100644
View file @
9557d51a
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/grey_300"
android:orientation=
"vertical"
>
<include
layout=
"@layout/toolbar_default_light"
/>
<ListView
android:id=
"@android:id/list"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"24dp"
android:divider=
"@null"
android:dividerHeight=
"0dp"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/chat_input_panel.xml
0 → 100644
View file @
9557d51a
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:tools=
"http://schemas.android.com/tools"
android:id=
"@+id/input_layout"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:background=
"@color/white"
android:elevation=
"8dp"
android:orientation=
"horizontal"
tools:showIn=
"@layout/chat_viewer_fragment"
>
<ImageButton
android:id=
"@+id/button_security"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:background=
"@null"
android:contentDescription=
"@string/otr_encryption"
android:padding=
"8dp"
android:src=
"@drawable/ic_security_grey_24dp"
/>
<EditText
android:id=
"@+id/chat_input"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:background=
"@android:color/transparent"
android:cursorVisible=
"true"
android:fadingEdge=
"vertical"
android:gravity=
"center_vertical"
android:hint=
"@string/chat_input_hint"
android:imeOptions=
"flagNoExtractUi"
android:inputType=
"textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:maxLines=
"4"
android:minHeight=
"40dp"
android:scrollbars=
"vertical"
/>
<ImageButton
android:id=
"@+id/button_send_message"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:background=
"@null"
android:contentDescription=
"@string/chat_send"
android:padding=
"8dp"
android:src=
"@drawable/ic_button_send"
/>
</LinearLayout>
\ No newline at end of file
app/src/main/res/layout/chat_viewer_fragment.xml
View file @
9557d51a
...
...
@@ -33,7 +33,7 @@
<include
android:id=
"@+id/contact_title"
layout=
"@layout/contact_title"
layout=
"@layout/contact_title
_dark
"
/>
</android.support.v7.widget.Toolbar>
...
...
@@ -52,54 +52,6 @@
tools:listitem=
"@layout/chat_viewer_outgoing_message"
/>
<LinearLayout
android:id=
"@+id/input_layout"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_alignParentBottom=
"true"
android:background=
"@color/white"
android:elevation=
"8dp"
android:orientation=
"horizontal"
>
<ImageButton
android:id=
"@+id/button_security"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:background=
"@null"
android:contentDescription=
"@string/otr_encryption"
android:padding=
"8dp"
android:src=
"@drawable/ic_security_grey_24dp"
/>
<EditText
android:id=
"@+id/chat_input"
android:layout_width=
"0dp"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:background=
"@android:color/transparent"
android:cursorVisible=
"true"
android:fadingEdge=
"vertical"
android:gravity=
"center_vertical"
android:hint=
"@string/chat_input_hint"
android:imeOptions=
"flagNoExtractUi"
android:inputType=
"textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"
android:maxLines=
"4"
android:minHeight=
"40dp"
android:scrollbars=
"vertical"
/>
<ImageButton
android:id=
"@+id/button_send_message"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_gravity=
"bottom"
android:background=
"@null"
android:contentDescription=
"@string/chat_send"
android:padding=
"8dp"
android:src=
"@drawable/ic_button_send"
/>
</LinearLayout>
<include
layout=
"@layout/chat_input_panel"
/>
</RelativeLayout>
app/src/main/res/layout/contact_title.xml
→
app/src/main/res/layout/contact_title
_dark
.xml
View file @
9557d51a
...
...
@@ -2,9 +2,9 @@
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:minHeight=
"?android:attr/actionBarSize"
android:orientation=
"horizontal"
android:gravity=
"center_vertical"
>
<ImageView
...
...
@@ -19,19 +19,19 @@
android:id=
"@+id/name_holder"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"6dp"
android:singleLine=
"true"
android:textColor=
"@color/primary_text_default_material_dark"
android:text=
"Lorem Ipsum"
android:
layout_marginLeft=
"6dp
"
android:
textColor=
"@color/primary_text_default_material_dark
"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
...
...
@@ -40,19 +40,19 @@
android:id=
"@+id/status_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"6dp"
android:singleLine=
"true"
android:textColor=
"@color/grey_200"
android:text=
"Lorem ipsum dolor sit amet"
android:
layout_marginLeft=
"6dp
"
android:
textColor=
"@color/grey_200
"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/status_icon"
android:src=
"@drawable/ic_status"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"8dp"
android:src=
"@drawable/ic_status"
/>
</LinearLayout>
app/src/main/res/layout/contact_title_light.xml
0 → 100644
View file @
9557d51a
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:gravity=
"center_vertical"
android:minHeight=
"?android:attr/actionBarSize"
android:orientation=
"horizontal"
>
<ImageView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/avatar"
android:layout_width=
"@dimen/avatar_size_toolbar"
android:layout_height=
"@dimen/avatar_size_toolbar"
android:src=
"@drawable/ic_avatar_1"
/>
<LinearLayout
android:id=
"@+id/name_holder"
android:layout_width=
"0dp"
android:layout_height=
"match_parent"
android:layout_weight=
"1"
android:gravity=
"center_vertical"
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/name"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"6dp"
android:singleLine=
"true"
android:text=
"Lorem Ipsum"
android:textColor=
"@color/primary_text_default_material_light"
android:textSize=
"18sp"
android:textStyle=
"bold"
/>
<TextView
android:id=
"@+id/status_text"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginLeft=
"6dp"
android:singleLine=
"true"
android:text=
"Lorem ipsum dolor sit amet"
android:textColor=
"@color/grey_900"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/status_icon"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginRight=
"8dp"
android:src=
"@drawable/ic_status"
/>
</LinearLayout>
app/src/main/res/layout/toolbar_default_light.xml
0 → 100644
View file @
9557d51a
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:id=
"@+id/toolbar_default"
android:layout_width=
"match_parent"
android:layout_height=
"?attr/actionBarSize"
android:background=
"?attr/colorPrimary"
android:elevation=
"8dp"
android:theme=
"@style/ThemeOverlay.AppCompat.Light"
app:popupTheme=
"@style/ThemeOverlay.AppCompat.Light"
app:titleTextAppearance=
"@style/ToolbarTitle"
/>
app/src/main/res/menu-w820dp/recent_chats.xml
0 → 100644
View file @
9557d51a
<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
>
<item
android:id=
"@+id/action_under_construction"
android:icon=
"@drawable/ic_alert_black_24dp"
android:orderInCategory=
"100"
android:title=
"@string/under_construction"
app:showAsAction=
"always"
/>
</menu>
\ No newline at end of file
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