Commit 42dca0e7 authored by Grigory Fedorov's avatar Grigory Fedorov

ChatViewer: action bar customized.

Several xml drawable removed, color arrays used.
parent ff216cbb
......@@ -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);
......
......@@ -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 {
......
......@@ -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());
......
......@@ -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.ColorDrawable;
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);
......
<?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
<?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
<?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>
<?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>
<?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>
<?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>
<?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>
<?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>
<?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>
<?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>
<?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
<?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
<?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
<?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
......@@ -26,7 +26,6 @@
android:layout_marginRight="3dp"
android:layout_marginEnd="3dp"
android:src="@drawable/account_color"
/>
<ImageView
android:id="@+id/avatar"
......
......@@ -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"
......
......@@ -28,7 +28,6 @@
android:layout_marginRight="3dp"
android:layout_marginEnd="3dp"
android:src="@drawable/account_color"
/>
<include layout="@layout/base_contact_avatar" />
<RelativeLayout
......
......@@ -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"
......
<?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>
......@@ -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"
......
......@@ -15,7 +15,7 @@
<QuickContactBadge
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/avatar"
android:layout_width="36dip"
android:layout_height="36dip"
android:layout_width="48dip"
android:layout_height="48dip"
android:src="@drawable/avatar_1_1"
/>
<?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
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2013, Redsolution LTD. All rights reserved.
<!-- https://gist.github.com/kalehv/bae765c756e94455ed88 -->
<resources>
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.
<color name="red_50">#ffebee</color>
<color name="red_100">#ffcdd2</color>
<color name="red_200">#ef9a9a</color>
<color name="red_300">#e57373</color>
<color name="red_400">#ef5350</color>
<color name="red_500">#f44336</color>
<color name="red_600">#e53935</color>
<color name="red_700">#d32f2f</color>
<color name="red_800">#c62828</color>
<color name="red_900">#b71c1c</color>
<color name="red_A100">#ff8a80</color>
<color name="red_A200">#ff5252</color>
<color name="red_A400">#ff1744</color>
<color name="red_A700">#d50000</color>
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.
<color name="pink_50">#fce4ec</color>
<color name="pink_100">#f8bbd0</color>
<color name="pink_200">#f48fb1</color>
<color name="pink_300">#f06292</color>
<color name="pink_400">#ec407a</color>
<color name="pink_500">#e91e63</color>
<color name="pink_600">#d81b60</color>
<color name="pink_700">#c2185b</color>
<color name="pink_800">#ad1457</color>
<color name="pink_900">#880e4f</color>
<color name="pink_A100">#ff80ab</color>
<color name="pink_A200">#ff4081</color>
<color name="pink_A400">#f50057</color>
<color name="pink_A700">#c51162</color>
You should have received a copy of the GNU General Public License,
along with this program. If not, see http://www.gnu.org/licenses/.
-->
<resources>
<color name="bright_foreground_dark">#ffffffff</color>
<color name="bright_foreground_light">#ff000000</color>
<color name="purple_50">#f3e5f5</color>
<color name="purple_100">#e1bee7</color>
<color name="purple_200">#ce93d8</color>
<color name="purple_300">#ba68c8</color>
<color name="purple_400">#ab47bc</color>
<color name="purple_500">#9c27b0</color>
<color name="purple_600">#8e24aa</color>
<color name="purple_700">#7b1fa2</color>
<color name="purple_800">#6a1b9a</color>
<color name="purple_900">#4a148c</color>
<color name="purple_A100">#ea80fc</color>
<color name="purple_A200">#e040fb</color>
<color name="purple_A400">#d500f9</color>
<color name="purple_A700">#aa00ff</color>
<color name="dark_purple_50">#ede7f6</color>
<color name="dark_purple_100">#d1c4e9</color>
<color name="dark_purple_200">#b39ddb</color>
<color name="dark_purple_300">#9575cd</color>
<color name="dark_purple_400">#7e57c2</color>
<color name="dark_purple_500">#673ab7</color>
<color name="dark_purple_600">#5e35b1</color>
<color name="dark_purple_700">#512da8</color>
<color name="dark_purple_800">#4527a0</color>
<color name="dark_purple_900">#311b92</color>
<color name="dark_purple_A100">#b388ff</color>
<color name="dark_purple_A200">#7c4dff</color>
<color name="dark_purple_A400">#651fff</color>
<color name="dark_purple_A700">#6200ea</color>
<color name="indigo_50">#e8eaf6</color>
<color name="indigo_100">#c5cae9</color>
<color name="indigo_200">#9fa8da</color>
<color name="indigo_300">#7986cb</color>
<color name="indigo_400">#5c6bc0</color>
<color name="indigo_500">#3f51b5</color>
<color name="indigo_600">#3949ab</color>
<color name="indigo_700">#303f9f</color>
<color name="indigo_800">#283593</color>
<color name="indigo_900">#1a237e</color>
<color name="indigo_A100">#8c9eff</color>
<color name="indigo_A200">#536dfe</color>
<color name="indigo_A400">#3d5afe</color>
<color name="indigo_A700">#304ffe</color>
<color name="blue_50">#e3f2fd</color>
<color name="blue_100">#bbdefb</color>
<color name="blue_200">#90caf9</color>
<color name="blue_300">#64b5f6</color>
<color name="blue_400">#42a5f5</color>
<color name="blue_500">#2196f3</color>
<color name="blue_600">#1e88e5</color>
<color name="blue_700">#1976d2</color>
<color name="blue_800">#1565c0</color>
<color name="blue_900">#0d47a1</color>
<color name="blue_A100">#82b1ff</color>
<color name="blue_A200">#448aff</color>
<color name="blue_A400">#2979ff</color>
<color name="blue_A700">#2962ff</color>
<color name="light_blue_50">#e1f5fe</color>
<color name="light_blue_100">#b3e5fc</color>
<color name="light_blue_200">#81d4fa</color>
<color name="light_blue_300">#4fc3f7</color>
<color name="light_blue_400">#29b6f6</color>
<color name="light_blue_500">#03a9f4</color>
<color name="light_blue_600">#039be5</color>
<color name="light_blue_700">#0288d1</color>
<color name="light_blue_800">#0277bd</color>
<color name="light_blue_900">#01579b</color>
<color name="light_blue_A100">#80d8ff</color>
<color name="light_blue_A200">#40c4ff</color>
<color name="light_blue_A400">#00b0ff</color>
<color name="light_blue_A700">#0091ea</color>
<color name="cyan_50">#e0f7fa</color>
<color name="cyan_100">#b2ebf2</color>
<color name="cyan_200">#80deea</color>
<color name="cyan_300">#4dd0e1</color>
<color name="cyan_400">#26c6da</color>
<color name="cyan_500">#00bcd4</color>
<color name="cyan_600">#00acc1</color>
<color name="cyan_700">#0097a7</color>
<color name="cyan_800">#00838f</color>
<color name="cyan_900">#006064</color>
<color name="cyan_A100">#84ffff</color>
<color name="cyan_A200">#18ffff</color>
<color name="cyan_A400">#00e5ff</color>
<color name="cyan_A700">#00b8d4</color>
<color name="teal_50">#e0f2f1</color>
<color name="teal_100">#b2dfdb</color>
<color name="teal_200">#80cbc4</color>
<color name="teal_300">#4db6ac</color>
<color name="teal_400">#26a69a</color>
<color name="teal_500">#009688</color>
<color name="teal_600">#00897b</color>
<color name="teal_700">#00796b</color>
<color name="teal_800">#00695c</color>
<color name="teal_900">#004d40</color>
<color name="teal_A100">#a7ffeb</color>
<color name="teal_A200">#64ffda</color>
<color name="teal_A400">#1de9b6</color>
<color name="teal_A700">#00bfa5</color>
<color name="green_50">#e8f5e9</color>
<color name="green_100">#c8e6c9</color>
<color name="green_200">#a5d6a7</color>
<color name="green_300">#81c784</color>
<color name="green_400">#66bb6a</color>
<color name="green_500">#4caf50</color>
<color name="green_600">#43a047</color>
<color name="green_700">#388e3c</color>
<color name="green_800">#2e7d32</color>
<color name="green_900">#1b5e20</color>
<color name="green_A100">#b9f6ca</color>
<color name="green_A200">#69f0ae</color>
<color name="green_A400">#00e676</color>
<color name="green_A700">#00c853</color>
<color name="light_green_50">#f1f8e9</color>
<color name="light_green_100">#dcedc8</color>
<color name="light_green_200">#c5e1a5</color>
<color name="light_green_300">#aed581</color>
<color name="light_green_400">#9ccc65</color>
<color name="light_green_500">#8bc34a</color>
<color name="light_green_600">#7cb342</color>
<color name="light_green_700">#689f38</color>
<color name="light_green_800">#558b2f</color>
<color name="light_green_900">#33691e</color>
<color name="light_green_A100">#ccff90</color>
<color name="light_green_A200">#b2ff59</color>
<color name="light_green_A400">#76ff03</color>
<color name="light_green_A700">#64dd17</color>
<color name="lime_50">#f9fbe7</color>
<color name="lime_100">#f0f4c3</color>
<color name="lime_200">#e6ee9c</color>
<color name="lime_300">#dce775</color>
<color name="lime_400">#d4e157</color>
<color name="lime_500">#cddc39</color>
<color name="lime_600">#c0ca33</color>
<color name="lime_700">#afb42b</color>
<color name="lime_800">#9e9d24</color>
<color name="lime_900">#827717</color>
<color name="lime_A100">#f4ff81</color>
<color name="lime_A200">#eeff41</color>
<color name="lime_A400">#c6ff00</color>
<color name="lime_A700">#aeea00</color>
<color name="yellow_50">#fffde7</color>
<color name="yellow_100">#fff9c4</color>
<color name="yellow_200">#fff59d</color>
<color name="yellow_300">#fff176</color>
<color name="yellow_400">#ffee58</color>
<color name="yellow_500">#ffeb3b</color>
<color name="yellow_600">#fdd835</color>
<color name="yellow_700">#fbc02d</color>
<color name="yellow_800">#f9a825</color>
<color name="yellow_900">#f57f17</color>
<color name="yellow_A100">#ffff8d</color>
<color name="yellow_A200">#ffff00</color>
<color name="yellow_A400">#ffea00</color>
<color name="yellow_A700">#ffd600</color>
<color name="amber_50">#fff8e1</color>
<color name="amber_100">#ffecb3</color>
<color name="amber_200">#ffe082</color>
<color name="amber_300">#ffd54f</color>
<color name="amber_400">#ffca28</color>
<color name="amber_500">#ffc107</color>
<color name="amber_600">#ffb300</color>
<color name="amber_700">#ffa000</color>
<color name="amber_800">#ff8f00</color>
<color name="amber_900">#ff6f00</color>
<color name="amber_A100">#ffe57f</color>
<color name="amber_A200">#ffd740</color>
<color name="amber_A400">#ffc400</color>
<color name="amber_A700">#ffab00</color>
<color name="orange_50">#fff3e0</color>
<color name="orange_100">#ffe0b2</color>
<color name="orange_200">#ffcc80</color>
<color name="orange_300">#ffb74d</color>
<color name="orange_400">#ffa726</color>
<color name="orange_500">#ff9800</color>
<color name="orange_600">#fb8c00</color>
<color name="orange_700">#f57c00</color>
<color name="orange_800">#ef6c00</color>
<color name="orange_900">#e65100</color>
<color name="orange_A100">#ffd180</color>
<color name="orange_A200">#ffab40</color>
<color name="orange_A400">#ff9100</color>
<color name="orange_A700">#ff6d00</color>
<color name="deep_orange_50">#fbe9e7</color>
<color name="deep_orange_100">#ffccbc</color>
<color name="deep_orange_200">#ffab91</color>
<color name="deep_orange_300">#ff8a65</color>
<color name="deep_orange_400">#ff7043</color>
<color name="deep_orange_500">#ff5722</color>
<color name="deep_orange_600">#f4511e</color>
<color name="deep_orange_700">#e64a19</color>
<color name="deep_orange_800">#d84315</color>
<color name="deep_orange_900">#bf360c</color>
<color name="deep_orange_A100">#ff9e80</color>
<color name="deep_orange_A200">#ff6e40</color>
<color name="deep_orange_A400">#ff3d00</color>
<color name="deep_orange_A700">#dd2c00</color>
<color name="brown_50">#efebe9</color>
<color name="brown_100">#d7ccc8</color>
<color name="brown_200">#bcaaa4</color>
<color name="brown_300">#a1887f</color>
<color name="brown_400">#8d6e63</color>
<color name="brown_500">#795548</color>
<color name="brown_600">#6d4c41</color>
<color name="brown_700">#5d4037</color>
<color name="brown_800">#4e342e</color>
<color name="brown_900">#3e2723</color>
<color name="grey_50">#fafafa</color>
<color name="grey_100">#f5f5f5</color>
<color name="grey_200">#eeeeee</color>
<color name="grey_300">#e0e0e0</color>
<color name="grey_400">#bdbdbd</color>
<color name="grey_500">#9e9e9e</color>
<color name="grey_600">#757575</color>
<color name="grey_700">#616161</color>
<color name="grey_800">#424242</color>
<color name="grey_900">#212121</color>
<color name="blue_grey_50">#eceff1</color>
<color name="blue_grey_100">#cfd8dc</color>
<color name="blue_grey_200">#b0bec5</color>
<color name="blue_grey_300">#90a4ae</color>
<color name="blue_grey_400">#78909c</color>
<color name="blue_grey_500">#607d8b</color>
<color name="blue_grey_600">#546e7a</color>
<color name="blue_grey_700">#455a64</color>
<color name="blue_grey_800">#37474f</color>
<color name="blue_grey_900">#263238</color>
<color name="account_1" >#FFCCFF90</color>
<color name="account_2" >#FFFFE57F</color>
<color name="account_3" >#FFFF8A80</color>
<color name="account_4" >#FF80D8FF</color>
<color name="black">#000000</color>
<color name="black_dividers">#1f000000</color>
<color name="black_text_disabled">#42000000</color>
<color name="black_text_secondary">#8a000000</color>
<color name="black_text">#de000000</color>
<color name="account_disabled" >#33000000</color>
<color name="white">#ffffff</color>
<color name="white_dividers">#1fffffff</color>
<color name="white_text_disabled">#4dffffff</color>
<color name="white_text_secondary">#b3ffffff</color>
<color name="white_text">#ffffff</color>
</resources>
</resources>
\ No newline at end of file
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment