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
42dca0e7
Commit
42dca0e7
authored
Feb 16, 2015
by
Grigory Fedorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ChatViewer: action bar customized.
Several xml drawable removed, color arrays used.
parent
ff216cbb
Changes
28
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
474 additions
and
392 deletions
+474
-392
ChatViewer.java
app/src/main/java/com/xabber/android/ui/ChatViewer.java
+71
-4
AccountToggleAdapter.java
...a/com/xabber/android/ui/adapter/AccountToggleAdapter.java
+6
-1
GroupedContactAdapter.java
.../com/xabber/android/ui/adapter/GroupedContactAdapter.java
+10
-2
ContactTitleInflater.java
...va/com/xabber/android/ui/helper/ContactTitleInflater.java
+5
-11
account_background.xml
app/src/main/res/drawable/account_background.xml
+0
-32
account_color.xml
app/src/main/res/drawable/account_color.xml
+0
-32
expander_account_1_dark.xml
app/src/main/res/drawable/expander_account_1_dark.xml
+0
-18
expander_account_1_light.xml
app/src/main/res/drawable/expander_account_1_light.xml
+0
-18
expander_account_2_dark.xml
app/src/main/res/drawable/expander_account_2_dark.xml
+0
-18
expander_account_2_light.xml
app/src/main/res/drawable/expander_account_2_light.xml
+0
-18
expander_account_3_dark.xml
app/src/main/res/drawable/expander_account_3_dark.xml
+0
-18
expander_account_3_light.xml
app/src/main/res/drawable/expander_account_3_light.xml
+0
-18
expander_account_4_dark.xml
app/src/main/res/drawable/expander_account_4_dark.xml
+0
-18
expander_account_4_light.xml
app/src/main/res/drawable/expander_account_4_light.xml
+0
-18
expander_background_dark.xml
app/src/main/res/drawable/expander_background_dark.xml
+0
-36
expander_background_light.xml
app/src/main/res/drawable/expander_background_light.xml
+0
-36
title_account_background_dark.xml
app/src/main/res/drawable/title_account_background_dark.xml
+0
-32
title_account_background_light.xml
app/src/main/res/drawable/title_account_background_light.xml
+0
-32
account_list_item.xml
app/src/main/res/layout/account_list_item.xml
+0
-1
account_toggler_item.xml
app/src/main/res/layout/account_toggler_item.xml
+0
-1
base_contact_item.xml
app/src/main/res/layout/base_contact_item.xml
+0
-1
base_group_item.xml
app/src/main/res/layout/base_group_item.xml
+0
-1
chat_viewer_action_bar.xml
app/src/main/res/layout/chat_viewer_action_bar.xml
+78
-0
contact_title.xml
app/src/main/res/layout/contact_title.xml
+0
-1
contact_title_avatar.xml
app/src/main/res/layout/contact_title_avatar.xml
+2
-2
color_arrays.xml
app/src/main/res/values/color_arrays.xml
+19
-0
colors.xml
app/src/main/res/values/colors.xml
+283
-19
theme.xml
app/src/main/res/values/theme.xml
+0
-4
No files found.
app/src/main/java/com/xabber/android/ui/ChatViewer.java
View file @
42dca0e7
...
...
@@ -16,11 +16,18 @@ package com.xabber.android.ui;
import
android.content.Context
;
import
android.content.Intent
;
import
android.graphics.drawable.ColorDrawable
;
import
android.os.Bundle
;
import
android.support.v4.view.ViewPager
;
import
android.support.v7.app.ActionBar
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.Window
;
import
android.view.WindowManager
;
import
com.xabber.android.data.ActivityManager
;
import
com.xabber.android.data.Application
;
import
com.xabber.android.data.account.AccountManager
;
import
com.xabber.android.data.account.OnAccountChangedListener
;
import
com.xabber.android.data.entity.BaseEntity
;
import
com.xabber.android.data.extension.archive.MessageArchiveManager
;
...
...
@@ -34,6 +41,7 @@ import com.xabber.android.data.roster.AbstractContact;
import
com.xabber.android.data.roster.OnContactChangedListener
;
import
com.xabber.android.data.roster.RosterManager
;
import
com.xabber.android.ui.adapter.ChatViewerAdapter
;
import
com.xabber.android.ui.helper.ContactTitleInflater
;
import
com.xabber.android.ui.helper.ManagedActivity
;
import
com.xabber.androiddev.R
;
...
...
@@ -67,12 +75,17 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
ChatViewerAdapter
chatViewerAdapter
;
ViewPager
viewPager
;
private
View
actionBarView
;
Collection
<
ChatViewerFragment
>
registeredChats
=
new
HashSet
<>();
Collection
<
RecentChatFragment
>
recentChatFragments
=
new
HashSet
<>();
private
String
actionWithAccount
=
null
;
private
String
actionWithUser
=
null
;
private
int
[]
accountActionBarColors
;
private
int
[]
accountStatusBarColors
;
private
Window
window
;
private
int
defaultStatusBarColor
;
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
...
...
@@ -98,7 +111,30 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
exitOnSend
=
savedInstanceState
.
getBoolean
(
SAVED_EXIT_ON_SEND
);
}
getSupportActionBar
().
setDisplayHomeAsUpEnabled
(
true
);
window
=
getWindow
();
window
.
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS
);
window
.
clearFlags
(
WindowManager
.
LayoutParams
.
FLAG_TRANSLUCENT_STATUS
);
defaultStatusBarColor
=
window
.
getStatusBarColor
();
accountActionBarColors
=
getResources
().
getIntArray
(
R
.
array
.
account_action_bar
);
accountStatusBarColors
=
getResources
().
getIntArray
(
R
.
array
.
account_status_bar
);
ActionBar
actionBar
=
getSupportActionBar
();
actionBar
.
setDisplayShowTitleEnabled
(
false
);
actionBar
.
setDisplayShowHomeEnabled
(
false
);
actionBar
.
setDisplayHomeAsUpEnabled
(
true
);
actionBar
.
setDisplayShowCustomEnabled
(
true
);
actionBarView
=
LayoutInflater
.
from
(
this
).
inflate
(
R
.
layout
.
chat_viewer_action_bar
,
null
);
actionBar
.
setCustomView
(
actionBarView
,
new
ActionBar
.
LayoutParams
(
ActionBar
.
LayoutParams
.
MATCH_PARENT
,
ActionBar
.
LayoutParams
.
MATCH_PARENT
));
setContentView
(
R
.
layout
.
activity_chat_viewer
);
...
...
@@ -132,6 +168,10 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
exitOnSend
=
true
;
}
}
if
(
actionWithAccount
!=
null
&&
actionWithUser
!=
null
)
{
updateActionBar
(
actionWithAccount
,
actionWithUser
);
}
}
@Override
...
...
@@ -267,6 +307,11 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
}
}
if
(
actionWithAccount
!=
null
&&
actionWithAccount
.
equals
(
account
)
&&
actionWithUser
!=
null
&&
actionWithUser
.
equals
(
user
))
{
updateActionBar
(
account
,
user
);
}
}
...
...
@@ -274,12 +319,20 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
public
void
onContactsChanged
(
Collection
<
BaseEntity
>
entities
)
{
updateRegisteredChats
();
updateRegisteredRecentChatsFragments
();
if
(
actionWithAccount
!=
null
&&
actionWithUser
!=
null
)
{
updateActionBar
(
actionWithAccount
,
actionWithUser
);
}
}
@Override
public
void
onAccountsChanged
(
Collection
<
String
>
accounts
)
{
updateRegisteredChats
();
updateRegisteredRecentChatsFragments
();
if
(
actionWithAccount
!=
null
&&
actionWithUser
!=
null
)
{
updateActionBar
(
actionWithAccount
,
actionWithUser
);
}
}
void
onSent
()
{
...
...
@@ -308,6 +361,10 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
AbstractChat
selectedChat
=
chatViewerAdapter
.
getChatByPageNumber
(
position
);
if
(
selectedChat
==
null
)
{
window
.
setStatusBarColor
(
defaultStatusBarColor
);
getSupportActionBar
().
setBackgroundDrawable
(
null
);
getSupportActionBar
().
setDisplayShowTitleEnabled
(
true
);
actionBarView
.
setVisibility
(
View
.
GONE
);
setTitle
(
getString
(
R
.
string
.
chat_list
));
MessageManager
.
getInstance
().
removeVisibleChat
();
return
;
...
...
@@ -316,9 +373,7 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
String
account
=
selectedChat
.
getAccount
();
String
user
=
selectedChat
.
getUser
();
final
AbstractContact
abstractContact
=
RosterManager
.
getInstance
().
getBestContact
(
account
,
user
);
setTitle
(
abstractContact
.
getName
());
updateActionBar
(
account
,
user
);
MessageManager
.
getInstance
().
setVisibleChat
(
account
,
user
);
...
...
@@ -332,6 +387,18 @@ public class ChatViewer extends ManagedActivity implements OnChatChangedListener
actionWithUser
=
user
;
}
private
void
updateActionBar
(
String
account
,
String
user
)
{
actionBarView
.
setVisibility
(
View
.
VISIBLE
);
getSupportActionBar
().
setDisplayShowTitleEnabled
(
false
);
final
AbstractContact
abstractContact
=
RosterManager
.
getInstance
().
getBestContact
(
account
,
user
);
ContactTitleInflater
.
updateTitle
(
actionBarView
,
this
,
abstractContact
);
int
colorLevel
=
AccountManager
.
getInstance
().
getColorLevel
(
abstractContact
.
getAccount
());
window
.
setStatusBarColor
(
accountStatusBarColors
[
colorLevel
]);
getSupportActionBar
().
setBackgroundDrawable
(
new
ColorDrawable
(
accountActionBarColors
[
colorLevel
]));
}
private
void
updateRegisteredChats
()
{
for
(
ChatViewerFragment
chat
:
registeredChats
)
{
chat
.
updateChat
(
false
);
...
...
app/src/main/java/com/xabber/android/ui/adapter/AccountToggleAdapter.java
View file @
42dca0e7
...
...
@@ -15,6 +15,7 @@
package
com
.
xabber
.
android
.
ui
.
adapter
;
import
android.app.Activity
;
import
android.graphics.drawable.ColorDrawable
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View.OnClickListener
;
...
...
@@ -52,6 +53,7 @@ public class AccountToggleAdapter implements UpdatableAdapter {
* List of accounts.
*/
private
final
ArrayList
<
String
>
accounts
;
private
int
[]
accountActionBarColors
;
public
AccountToggleAdapter
(
Activity
activity
,
OnClickListener
onClickListener
,
LinearLayout
linearLayout
)
{
...
...
@@ -72,6 +74,9 @@ public class AccountToggleAdapter implements UpdatableAdapter {
accounts
.
addAll
(
AccountManager
.
getInstance
().
getAccounts
());
Collections
.
sort
(
accounts
);
final
int
size
=
accounts
.
size
();
accountActionBarColors
=
activity
.
getResources
().
getIntArray
(
R
.
array
.
account_action_bar
);
final
LayoutInflater
inflater
=
(
LayoutInflater
)
activity
.
getSystemService
(
Activity
.
LAYOUT_INFLATER_SERVICE
);
while
(
linearLayout
.
getChildCount
()
<
size
)
{
...
...
@@ -97,7 +102,7 @@ public class AccountToggleAdapter implements UpdatableAdapter {
final
String
account
=
accounts
.
get
(
index
);
StatusMode
statusMode
=
AccountManager
.
getInstance
().
getAccount
(
account
).
getDisplayStatusMode
();
int
colorLevel
=
AccountManager
.
getInstance
().
getColorLevel
(
account
);
view
.
getBackground
().
setLevel
(
colorLevel
);
view
.
setBackgroundDrawable
(
new
ColorDrawable
(
accountActionBarColors
[
colorLevel
])
);
if
(
selected
==
null
||
account
.
equals
(
selected
))
{
accountViewHolder
.
disabled
.
setVisibility
(
View
.
GONE
);
}
else
{
...
...
app/src/main/java/com/xabber/android/ui/adapter/GroupedContactAdapter.java
View file @
42dca0e7
...
...
@@ -18,6 +18,7 @@ import android.app.Activity;
import
android.content.Context
;
import
android.content.res.ColorStateList
;
import
android.content.res.TypedArray
;
import
android.graphics.drawable.ColorDrawable
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.ViewGroup
;
...
...
@@ -92,11 +93,16 @@ public abstract class GroupedContactAdapter<Inflater extends BaseContactInflater
*/
private
final
LayoutInflater
layoutInflater
;
private
int
[]
accountActionBarColors
;
public
GroupedContactAdapter
(
Activity
activity
,
ListView
listView
,
Inflater
inflater
,
StateProvider
groupStateProvider
)
{
super
(
activity
,
listView
,
inflater
);
layoutInflater
=
(
LayoutInflater
)
activity
.
getSystemService
(
Context
.
LAYOUT_INFLATER_SERVICE
);
this
.
groupStateProvider
=
groupStateProvider
;
accountActionBarColors
=
activity
.
getResources
().
getIntArray
(
R
.
array
.
account_action_bar
);
TypedArray
typedArray
;
typedArray
=
activity
.
getTheme
().
obtainStyledAttributes
(
R
.
styleable
.
ContactList
);
expanderAccountTextColor
=
typedArray
.
getColorStateList
(
R
.
styleable
.
ContactList_expanderAccountColor
);
...
...
@@ -148,11 +154,13 @@ public abstract class GroupedContactAdapter<Inflater extends BaseContactInflater
if
(
configuration
instanceof
AccountConfiguration
)
{
level
=
AccountManager
.
getInstance
().
getColorLevel
(
configuration
.
getAccount
());
viewHolder
.
name
.
setTextColor
(
expanderAccountTextColor
);
view
.
setBackgroundDrawable
(
new
ColorDrawable
(
accountActionBarColors
[
level
]));
}
else
{
level
=
AccountManager
.
getInstance
().
getColorCount
();
view
.
setBackgroundDrawable
(
new
ColorDrawable
(
activity
.
getResources
().
getColor
(
R
.
color
.
group_expander
)));
viewHolder
.
name
.
setTextColor
(
expanderGroupTextColor
);
}
view
.
getBackground
().
setLevel
(
level
);
viewHolder
.
name
.
getBackground
().
setLevel
(
configuration
.
getShowOfflineMode
().
ordinal
());
final
String
name
=
GroupManager
.
getInstance
().
getGroupName
(
configuration
.
getAccount
(),
configuration
.
getUser
());
...
...
app/src/main/java/com/xabber/android/ui/helper/ContactTitleInflater.java
View file @
42dca0e7
...
...
@@ -15,12 +15,11 @@
package
com
.
xabber
.
android
.
ui
.
helper
;
import
android.app.Activity
;
import
android.content.res.TypedArray
;
import
android.graphics.Bitmap
;
import
android.graphics.BitmapFactory
;
import
android.graphics.Shader.TileMode
;
import
android.graphics.drawable.BitmapDrawable
;
import
android.graphics.drawable.Drawable
;
import
android.graphics.drawable.
Color
Drawable
;
import
android.view.View
;
import
android.widget.ImageView
;
import
android.widget.TextView
;
...
...
@@ -50,23 +49,18 @@ public class ContactTitleInflater {
*/
public
static
void
updateTitle
(
View
titleView
,
final
Activity
activity
,
AbstractContact
abstractContact
)
{
final
TypedArray
typedArray
=
activity
.
obtainStyledAttributes
(
R
.
styleable
.
ContactList
);
final
Drawable
titleAccountBackground
=
typedArray
.
getDrawable
(
R
.
styleable
.
ContactList_titleAccountBackground
);
typedArray
.
recycle
();
final
TextView
nameView
=
(
TextView
)
titleView
.
findViewById
(
R
.
id
.
name
);
final
ImageView
avatarView
=
(
ImageView
)
titleView
.
findViewById
(
R
.
id
.
avatar
);
final
ImageView
statusModeView
=
(
ImageView
)
titleView
.
findViewById
(
R
.
id
.
status_mode
);
final
TextView
statusTextView
=
(
TextView
)
titleView
.
findViewById
(
R
.
id
.
status_text
);
final
View
shadowView
=
titleView
.
findViewById
(
R
.
id
.
shadow
);
titleView
.
setBackgroundDrawable
(
titleAccountBackground
);
int
[]
accountActionBarColors
=
activity
.
getResources
().
getIntArray
(
R
.
array
.
account_action_bar
);
titleView
.
setBackgroundDrawable
(
new
ColorDrawable
(
accountActionBarColors
[
AccountManager
.
getInstance
().
getColorLevel
(
abstractContact
.
getAccount
())]));
nameView
.
setText
(
abstractContact
.
getName
());
statusModeView
.
setImageLevel
(
abstractContact
.
getStatusMode
().
getStatusLevel
());
titleView
.
getBackground
().
setLevel
(
AccountManager
.
getInstance
().
getColorLevel
(
abstractContact
.
getAccount
()));
avatarView
.
setImageDrawable
(
abstractContact
.
getAvatar
());
setStatusText
(
activity
,
abstractContact
,
statusTextView
);
...
...
app/src/main/res/drawable/account_background.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<level-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_1"
android:minLevel=
"0"
android:maxLevel=
"0"
/>
<item
android:drawable=
"@color/account_2"
android:minLevel=
"1"
android:maxLevel=
"1"
/>
<item
android:drawable=
"@color/account_3"
android:minLevel=
"2"
android:maxLevel=
"2"
/>
<item
android:drawable=
"@color/account_4"
android:minLevel=
"3"
android:maxLevel=
"3"
/>
</level-list>
\ No newline at end of file
app/src/main/res/drawable/account_color.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<level-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_1"
android:minLevel=
"0"
android:maxLevel=
"0"
/>
<item
android:drawable=
"@color/account_2"
android:minLevel=
"1"
android:maxLevel=
"1"
/>
<item
android:drawable=
"@color/account_3"
android:minLevel=
"2"
android:maxLevel=
"2"
/>
<item
android:drawable=
"@color/account_4"
android:minLevel=
"3"
android:maxLevel=
"3"
/>
</level-list>
\ No newline at end of file
app/src/main/res/drawable/expander_account_1_dark.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_1"
/>
</selector>
app/src/main/res/drawable/expander_account_1_light.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_1"
/>
</selector>
app/src/main/res/drawable/expander_account_2_dark.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_2"
/>
</selector>
app/src/main/res/drawable/expander_account_2_light.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_2"
/>
</selector>
app/src/main/res/drawable/expander_account_3_dark.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_3"
/>
</selector>
app/src/main/res/drawable/expander_account_3_light.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_3"
/>
</selector>
app/src/main/res/drawable/expander_account_4_dark.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_4"
/>
</selector>
app/src/main/res/drawable/expander_account_4_light.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<selector
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_4"
/>
</selector>
app/src/main/res/drawable/expander_background_dark.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<level-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@drawable/expander_account_1_dark"
android:minLevel=
"0"
android:maxLevel=
"0"
/>
<item
android:drawable=
"@drawable/expander_account_2_dark"
android:minLevel=
"1"
android:maxLevel=
"1"
/>
<item
android:drawable=
"@drawable/expander_account_3_dark"
android:minLevel=
"2"
android:maxLevel=
"2"
/>
<item
android:drawable=
"@drawable/expander_account_4_dark"
android:minLevel=
"3"
android:maxLevel=
"3"
/>
<item
android:drawable=
"@drawable/expander_group_dark"
android:minLevel=
"4"
android:maxLevel=
"4"
/>
</level-list>
\ No newline at end of file
app/src/main/res/drawable/expander_background_light.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<level-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@drawable/expander_account_1_light"
android:minLevel=
"0"
android:maxLevel=
"0"
/>
<item
android:drawable=
"@drawable/expander_account_2_light"
android:minLevel=
"1"
android:maxLevel=
"1"
/>
<item
android:drawable=
"@drawable/expander_account_3_light"
android:minLevel=
"2"
android:maxLevel=
"2"
/>
<item
android:drawable=
"@drawable/expander_account_4_light"
android:minLevel=
"3"
android:maxLevel=
"3"
/>
<item
android:drawable=
"@drawable/expander_group_light"
android:minLevel=
"4"
android:maxLevel=
"4"
/>
</level-list>
\ No newline at end of file
app/src/main/res/drawable/title_account_background_dark.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<level-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_1"
android:minLevel=
"0"
android:maxLevel=
"0"
/>
<item
android:drawable=
"@color/account_2"
android:minLevel=
"1"
android:maxLevel=
"1"
/>
<item
android:drawable=
"@color/account_3"
android:minLevel=
"2"
android:maxLevel=
"2"
/>
<item
android:drawable=
"@color/account_4"
android:minLevel=
"3"
android:maxLevel=
"3"
/>
</level-list>
\ No newline at end of file
app/src/main/res/drawable/title_account_background_light.xml
deleted
100644 → 0
View file @
ff216cbb
<?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/.
-->
<level-list
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<item
android:drawable=
"@color/account_1"
android:minLevel=
"0"
android:maxLevel=
"0"
/>
<item
android:drawable=
"@color/account_2"
android:minLevel=
"1"
android:maxLevel=
"1"
/>
<item
android:drawable=
"@color/account_3"
android:minLevel=
"2"
android:maxLevel=
"2"
/>
<item
android:drawable=
"@color/account_4"
android:minLevel=
"3"
android:maxLevel=
"3"
/>
</level-list>
\ No newline at end of file
app/src/main/res/layout/account_list_item.xml
View file @
42dca0e7
...
...
@@ -26,7 +26,6 @@
android:layout_marginRight=
"3dp"
android:layout_marginEnd=
"3dp"
android:src=
"@drawable/account_color"
/>
<ImageView
android:id=
"@+id/avatar"
...
...
app/src/main/res/layout/account_toggler_item.xml
View file @
42dca0e7
...
...
@@ -16,7 +16,6 @@
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:background=
"@drawable/account_background"
>
<ImageView
android:id=
"@+id/avatar"
...
...
app/src/main/res/layout/base_contact_item.xml
View file @
42dca0e7
...
...
@@ -28,7 +28,6 @@
android:layout_marginRight=
"3dp"
android:layout_marginEnd=
"3dp"
android:src=
"@drawable/account_color"
/>
<include
layout=
"@layout/base_contact_avatar"
/>
<RelativeLayout
...
...
app/src/main/res/layout/base_group_item.xml
View file @
42dca0e7
...
...
@@ -17,7 +17,6 @@
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/expander_height"
android:gravity=
"center_vertical|start"
android:background=
"@drawable/expander_background_dark"
>
<ImageView
android:id=
"@+id/indicator"
...
...
app/src/main/res/layout/chat_viewer_action_bar.xml
0 → 100644
View file @
42dca0e7
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/title"
android:layout_width=
"match_parent"
android:layout_height=
"?android:attr/actionBarSize"
>
<LinearLayout
android:id=
"@+id/title_color"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"center_vertical"
>
<LinearLayout
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:gravity=
"center_vertical"
>
<include
layout=
"@layout/contact_title_avatar"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/security"
android:src=
"@drawable/ic_security"
android:paddingLeft=
"6dip"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:visibility=
"gone"
/>
<LinearLayout
android:id=
"@+id/name_holder"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:orientation=
"vertical"
android:layout_weight=
"1"
android:layout_gravity=
"center_vertical"
android:paddingLeft=
"6dip"
>
<TextView
android:id=
"@+id/name"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"bottom"
android:singleLine=
"true"
android:ellipsize=
"marquee"
android:textStyle=
"bold"
android:textColor=
"@color/secondary_text_default_material_light"
android:text=
"name"
/>
<TextView
android:id=
"@+id/status_text"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_weight=
"1"
android:gravity=
"top"
android:singleLine=
"true"
android:ellipsize=
"marquee"
android:textColor=
"@color/secondary_text_default_material_light"
android:text=
"status"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/status_mode"
android:src=
"@drawable/ic_status"
android:paddingLeft=
"@dimen/active_chat_padding_right"
android:paddingRight=
"@dimen/active_chat_padding_right"
android:layout_width=
"wrap_content"
android:layout_height=
"match_parent"
android:visibility=
"gone"
/>
</LinearLayout>
<ImageView
android:id=
"@+id/shadow"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@drawable/shadow"
android:visibility=
"gone"
/>
</RelativeLayout>
app/src/main/res/layout/contact_title.xml
View file @
42dca0e7
...
...
@@ -17,7 +17,6 @@
android:id=
"@+id/title"
android:layout_width=
"match_parent"
android:layout_height=
"@dimen/title_height"
android:background=
"@drawable/title_account_background_light"
>
<LinearLayout
android:id=
"@+id/title_color"
...
...
app/src/main/res/layout/contact_title_avatar.xml
View file @
42dca0e7
...
...
@@ -15,7 +15,7 @@
<QuickContactBadge
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/avatar"
android:layout_width=
"
36
dip"
android:layout_height=
"
36
dip"
android:layout_width=
"
48
dip"
android:layout_height=
"
48
dip"
android:src=
"@drawable/avatar_1_1"
/>
app/src/main/res/values/color_arrays.xml
0 → 100644
View file @
42dca0e7
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array
name=
"account_action_bar"
>
<item>
@color/green_500
</item>
<item>
@color/yellow_500
</item>
<item>
@color/red_500
</item>
<item>
@color/blue_500
</item>
</array>
<array
name=
"account_status_bar"
>
<item>
@color/green_700
</item>
<item>
@color/yellow_700
</item>
<item>
@color/red_700
</item>
<item>
@color/blue_700
</item>
</array>
<color
name=
"account_disabled"
>
@color/black_dividers
</color>
<color
name=
"group_expander"
>
@color/blue_grey_800
</color>
</resources>
\ No newline at end of file
app/src/main/res/values/colors.xml
View file @
42dca0e7
This diff is collapsed.
Click to expand it.
app/src/main/res/values/theme.xml
View file @
42dca0e7
...
...
@@ -14,12 +14,8 @@
-->
<resources>
<style
name=
"Theme"
parent=
"Theme.AppCompat"
>
<item
name=
"expanderBackground"
>
@drawable/expander_background_dark
</item>
<item
name=
"expanderGroupColor"
>
?android:attr/textColorPrimary
</item>
<item
name=
"expanderAccountColor"
>
?android:attr/textColorPrimaryInverse
</item>
<item
name=
"accountBackground"
>
@drawable/account_background
</item>
<item
name=
"expanderIndicator"
>
@drawable/expander_indicator_dark
</item>
<item
name=
"titleAccountBackground"
>
@drawable/title_account_background_dark
</item>
<item
name=
"textColorPrimaryNoSelected"
>
@color/bright_foreground_dark
</item>
</style>
</resources>
\ 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