Commit 822404c0 authored by Grigory Fedorov's avatar Grigory Fedorov

Material color 900 used for account names in navigation drawer. #449

parent 75e65596
......@@ -46,7 +46,7 @@ public class NavigationDrawerAccountAdapter extends BaseListEditorAdapter<String
TextView accountName = (TextView) view.findViewById(R.id.name);
accountName.setText(RosterManager.getInstance().getBestContact(account, accountManager.getVerboseName(account)).getName());
accountName.setTextColor(accountPainter.getAccountDarkColor(account));
accountName.setTextColor(accountPainter.getAccountDarkestColor(account));
((TextView) view.findViewById(R.id.account_jid)).setText(accountManager.getVerboseName(account));
......
......@@ -17,11 +17,13 @@ public class AccountPainter {
private int[] accountMainColors;
private int[] accountDarkColors;
private int[] accountDarkestColors;
public AccountPainter(Context context) {
accountMainColors = context.getResources().getIntArray(R.array.account_action_bar);
accountDarkColors = context.getResources().getIntArray(R.array.account_status_bar);
accountDarkestColors = context.getResources().getIntArray(R.array.account_900);
accountColorNames = context.getResources().getStringArray(R.array.account_color_names);
......@@ -84,6 +86,11 @@ public class AccountPainter {
return accountDarkColors[getAccountColorLevel(account)];
}
public int getAccountDarkestColor(String account) {
return accountDarkestColors[getAccountColorLevel(account)];
}
public int getDefaultDarkColor() {
String firstAccount = getFirstAccount();
if (firstAccount == null) {
......
......@@ -67,6 +67,16 @@
<item>@color/teal_50</item>
</array>
<array name="account_900">
<item>@color/green_900</item>
<item>@color/orange_900</item>
<item>@color/red_900</item>
<item>@color/blue_900</item>
<item>@color/indigo_900</item>
<item>@color/blue_grey_900</item>
<item>@color/cyan_900</item>
<item>@color/teal_900</item>
</array>
<color name="color_primary_light">@color/grey_200</color>
......
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