Commit 31bce8cd authored by Grigory Fedorov's avatar Grigory Fedorov

ChatViewerFragment: background set according to account.

parent dab100a1
......@@ -4,6 +4,7 @@ import android.app.Fragment;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
......@@ -22,6 +23,7 @@ import android.widget.ListView;
import android.widget.TextView;
import com.xabber.android.data.SettingsManager;
import com.xabber.android.data.account.AccountManager;
import com.xabber.android.data.extension.cs.ChatStateManager;
import com.xabber.android.data.message.MessageItem;
import com.xabber.android.data.message.MessageManager;
......@@ -74,6 +76,10 @@ public class ChatViewerFragment extends Fragment {
listView = (ListView) view.findViewById(android.R.id.list);
listView.setAdapter(chatMessageAdapter);
view .setBackgroundDrawable(new ColorDrawable(
getActivity().getResources().getIntArray(R.array.account_chat_background)[
AccountManager.getInstance().getColorLevel(account)]));
inputView = (EditText) view.findViewById(R.id.chat_input);
view.findViewById(R.id.chat_send).setOnClickListener(
......
......@@ -14,11 +14,11 @@
<item>@color/dark_purple_700</item>
</array>
<array name="accout_chat_background">
<item>@color/teal_A100</item>
<item>@color/deep_orange_A100</item>
<item>@color/pink_A100</item>
<item>@color/dark_purple_A100</item>
<array name="account_chat_background">
<item>@color/teal_900</item>
<item>@color/deep_orange_900</item>
<item>@color/pink_900</item>
<item>@color/dark_purple_900</item>
</array>
<color name="account_disabled">@color/black_dividers</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