Commit 8270333d authored by Grigory Fedorov's avatar Grigory Fedorov

Chat message send button now has account's color.

parent d4a20533
...@@ -18,10 +18,12 @@ import android.view.inputmethod.EditorInfo; ...@@ -18,10 +18,12 @@ import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView; import android.widget.AdapterView;
import android.widget.EditText; import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ListView; import android.widget.ListView;
import android.widget.TextView; import android.widget.TextView;
import com.xabber.android.data.SettingsManager; 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.extension.cs.ChatStateManager;
import com.xabber.android.data.message.MessageItem; import com.xabber.android.data.message.MessageItem;
import com.xabber.android.data.message.MessageManager; import com.xabber.android.data.message.MessageManager;
...@@ -68,6 +70,9 @@ public class ChatViewerFragment extends Fragment implements AdapterView.OnItemCl ...@@ -68,6 +70,9 @@ public class ChatViewerFragment extends Fragment implements AdapterView.OnItemCl
View view = inflater.inflate(R.layout.chat_viewer_item, container, false); View view = inflater.inflate(R.layout.chat_viewer_item, container, false);
((ImageButton)view.findViewById(R.id.button_send_message))
.setImageLevel(AccountManager.getInstance().getColorLevel(account));
chatMessageAdapter = new ChatMessageAdapter(getActivity(), account, user); chatMessageAdapter = new ChatMessageAdapter(getActivity(), account, user);
listView = (ListView) view.findViewById(android.R.id.list); listView = (ListView) view.findViewById(android.R.id.list);
...@@ -77,7 +82,7 @@ public class ChatViewerFragment extends Fragment implements AdapterView.OnItemCl ...@@ -77,7 +82,7 @@ public class ChatViewerFragment extends Fragment implements AdapterView.OnItemCl
inputView = (EditText) view.findViewById(R.id.chat_input); inputView = (EditText) view.findViewById(R.id.chat_input);
view.findViewById(R.id.chat_send).setOnClickListener( view.findViewById(R.id.button_send_message).setOnClickListener(
new View.OnClickListener() { new View.OnClickListener() {
@Override @Override
......
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/ic_button_send_green_24dp" android:minLevel="0" android:maxLevel="0" />
<item android:drawable="@drawable/ic_button_send_orange_24dp" android:minLevel="1" android:maxLevel="1" />
<item android:drawable="@drawable/ic_button_send_red_24dp" android:minLevel="2" android:maxLevel="2" />
<item android:drawable="@drawable/ic_button_send_blue_24dp" android:minLevel="3" android:maxLevel="3" />
</level-list>
\ No newline at end of file
...@@ -60,11 +60,11 @@ ...@@ -60,11 +60,11 @@
/> />
<ImageButton <ImageButton
android:id="@+id/chat_send" android:id="@+id/button_send_message"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="8dp" android:padding="8dp"
android:src="@drawable/ic_button_send_24dp" android:src="@drawable/ic_button_send"
android:background="@null" android:background="@null"
android:contentDescription="@string/chat_send" /> android:contentDescription="@string/chat_send" />
</LinearLayout> </LinearLayout>
......
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