Commit 6083c4e8 authored by Grigory Fedorov's avatar Grigory Fedorov

A lof of PNG resources replaced by simple colors and removed.

parent 3ff0488c
......@@ -220,7 +220,6 @@
<activity
android:label="@string/contact_viewer"
android:name="com.xabber.android.ui.preferences.ContactViewer"
android:icon="@drawable/ic_information"
android:parentActivityName="com.xabber.android.ui.ContactList"
>
<!-- Parent activity meta-data to support 4.0 and lower -->
......@@ -388,10 +387,6 @@
android:name="android.content.SyncAdapter"
android:resource="@xml/syncadapter"
/>
<meta-data
android:name="android.provider.CONTACTS_STRUCTURE"
android:resource="@xml/contacts_structure"
/>
</service>
<service
android:name="com.xabber.android.service.AccountAuthenticatorService"
......
......@@ -21,7 +21,6 @@ import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;
import com.xabber.android.data.SettingsManager;
import com.xabber.android.data.account.AccountManager;
import com.xabber.android.data.account.StatusMode;
import com.xabber.android.data.extension.avatar.AvatarManager;
......@@ -91,7 +90,6 @@ public class AccountToggleAdapter implements UpdatableAdapter {
@Override
public void onChange() {
boolean contactsShowAccounts = SettingsManager.contactsShowAccounts();
String selected = AccountManager.getInstance().getSelectedAccount();
for (int index = 0; index < accounts.size(); index++) {
final View view = linearLayout.getChildAt(index);
......@@ -100,17 +98,11 @@ public class AccountToggleAdapter implements UpdatableAdapter {
StatusMode statusMode = AccountManager.getInstance().getAccount(account).getDisplayStatusMode();
int colorLevel = AccountManager.getInstance().getColorLevel(account);
view.getBackground().setLevel(colorLevel);
if (contactsShowAccounts) {
accountViewHolder.statusMode.setBackgroundResource(R.drawable.account_border);
} else {
accountViewHolder.statusMode.setBackgroundResource(R.drawable.account_border_persistent);
}
if (selected == null || account.equals(selected)) {
accountViewHolder.disabled.setVisibility(View.GONE);
} else {
accountViewHolder.disabled.setVisibility(View.VISIBLE);
}
accountViewHolder.statusMode.getBackground().setLevel(colorLevel);
accountViewHolder.statusMode.setImageLevel(statusMode.ordinal());
accountViewHolder.avatar.setImageDrawable(AvatarManager.getInstance().getAccountAvatar(account));
}
......
......@@ -14,19 +14,19 @@
-->
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/account_background_1"
android:drawable="@color/account_1"
android:minLevel="0"
android:maxLevel="0" />
<item
android:drawable="@drawable/account_background_2"
android:drawable="@color/account_2"
android:minLevel="1"
android:maxLevel="1" />
<item
android:drawable="@drawable/account_background_3"
android:drawable="@color/account_3"
android:minLevel="2"
android:maxLevel="2" />
<item
android:drawable="@drawable/account_background_4"
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="@drawable/account_border_1"
android:minLevel="0"
android:maxLevel="0" />
<item
android:drawable="@drawable/account_border_2"
android:minLevel="1"
android:maxLevel="1" />
<item
android:drawable="@drawable/account_border_3"
android:minLevel="2"
android:maxLevel="2" />
<item
android:drawable="@drawable/account_border_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:state_selected="true"
android:drawable="@drawable/account_border_1_pressed" />
<item
android:state_focused="true"
android:drawable="@drawable/account_border_1_pressed" />
<item
android:state_pressed="true"
android:drawable="@drawable/account_border_1_pressed" />
<item
android:drawable="@drawable/account_border_1_normal" />
</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:state_selected="true"
android:drawable="@drawable/account_border_2_pressed" />
<item
android:state_focused="true"
android:drawable="@drawable/account_border_2_pressed" />
<item
android:state_pressed="true"
android:drawable="@drawable/account_border_2_pressed" />
<item
android:drawable="@drawable/account_border_2_normal" />
</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:state_selected="true"
android:drawable="@drawable/account_border_3_pressed" />
<item
android:state_focused="true"
android:drawable="@drawable/account_border_3_pressed" />
<item
android:state_pressed="true"
android:drawable="@drawable/account_border_3_pressed" />
<item
android:drawable="@drawable/account_border_3_normal" />
</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:state_selected="true"
android:drawable="@drawable/account_border_4_pressed" />
<item
android:state_focused="true"
android:drawable="@drawable/account_border_4_pressed" />
<item
android:state_pressed="true"
android:drawable="@drawable/account_border_4_pressed" />
<item
android:drawable="@drawable/account_border_4_normal" />
</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/account_border_1_normal"
android:minLevel="0"
android:maxLevel="0" />
<item
android:drawable="@drawable/account_border_2_normal"
android:minLevel="1"
android:maxLevel="1" />
<item
android:drawable="@drawable/account_border_3_normal"
android:minLevel="2"
android:maxLevel="2" />
<item
android:drawable="@drawable/account_border_4_normal"
android:minLevel="3"
android:maxLevel="3" />
</level-list>
\ No newline at end of file
......@@ -14,19 +14,19 @@
-->
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/account_color_1"
android:drawable="@color/account_1"
android:minLevel="0"
android:maxLevel="0" />
<item
android:drawable="@drawable/account_color_2"
android:drawable="@color/account_2"
android:minLevel="1"
android:maxLevel="1" />
<item
android:drawable="@drawable/account_color_3"
android:drawable="@color/account_3"
android:minLevel="2"
android:maxLevel="2" />
<item
android:drawable="@drawable/account_color_4"
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="@drawable/btn_status_mode_normal" />
</selector>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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