mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-30 12:42:16 -05:00
contact tiles follow material colors as well
This commit is contained in:
parent
3ac70d4b86
commit
da0b426125
@ -61,6 +61,9 @@ public class ConversationFragment extends Fragment {
|
||||
protected Contact contact;
|
||||
protected BitmapCache mBitmapCache = new BitmapCache();
|
||||
|
||||
protected int mPrimaryTextColor;
|
||||
protected int mSecondaryTextColor;
|
||||
|
||||
protected String queuedPqpMessage = null;
|
||||
|
||||
private EditText chatMsg;
|
||||
@ -177,6 +180,9 @@ public class ConversationFragment extends Fragment {
|
||||
|
||||
this.inflater = inflater;
|
||||
|
||||
mPrimaryTextColor = getResources().getColor(R.color.primarytext);
|
||||
mSecondaryTextColor = getResources().getColor(R.color.secondarytext);
|
||||
|
||||
final View view = inflater.inflate(R.layout.fragment_conversation,
|
||||
container, false);
|
||||
chatMsg = (EditText) view.findViewById(R.id.textinput);
|
||||
@ -264,7 +270,7 @@ public class ConversationFragment extends Fragment {
|
||||
if (error) {
|
||||
viewHolder.time.setTextColor(0xFFe92727);
|
||||
} else {
|
||||
viewHolder.time.setTextColor(0xFF8e8e8e);
|
||||
viewHolder.time.setTextColor(mSecondaryTextColor);
|
||||
}
|
||||
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
|
||||
viewHolder.indicator.setVisibility(View.GONE);
|
||||
@ -341,7 +347,7 @@ public class ConversationFragment extends Fragment {
|
||||
} else {
|
||||
viewHolder.messageBody.setText("");
|
||||
}
|
||||
viewHolder.messageBody.setTextColor(0xff333333);
|
||||
viewHolder.messageBody.setTextColor(mPrimaryTextColor);
|
||||
viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
|
||||
viewHolder.messageBody.setTextIsSelectable(true);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ import android.widget.TextView;
|
||||
|
||||
public class UIHelper {
|
||||
private static final int BG_COLOR = 0xFF181818;
|
||||
private static final int FG_COLOR = 0xFFE5E5E5;
|
||||
private static final int FG_COLOR = 0xFFFAFAFA;
|
||||
private static final int TRANSPARENT = 0x00000000;
|
||||
private static final int DATE_NO_YEAR_FLAGS = DateUtils.FORMAT_SHOW_DATE
|
||||
| DateUtils.FORMAT_NO_YEAR | DateUtils.FORMAT_ABBREV_ALL;
|
||||
@ -120,8 +120,9 @@ public class UIHelper {
|
||||
}
|
||||
|
||||
private static int getNameColor(String name) {
|
||||
int holoColors[] = { 0xFF1da9da, 0xFFb368d9, 0xFF83b600, 0xFFffa713,
|
||||
0xFFe92727 };
|
||||
/*int holoColors[] = { 0xFF1da9da, 0xFFb368d9, 0xFF83b600, 0xFFffa713,
|
||||
0xFFe92727 };*/
|
||||
int holoColors[] = {0xFFe91e63, 0xFF9c27b0, 0xFF673ab7, 0xFF3f51b5, 0xFF5677fc, 0xFF03a9f4, 0xFF00bcd4, 0xFF009688, 0xFFff5722, 0xFF795548, 0xFF607d8b};
|
||||
return holoColors[(int) ((name.hashCode() & 0xffffffffl) % holoColors.length)];
|
||||
}
|
||||
|
||||
@ -165,7 +166,7 @@ public class UIHelper {
|
||||
|
||||
if (names.length > 4) {
|
||||
letters[3] = "\u2026"; // Unicode ellipsis
|
||||
colors[3] = 0xFF444444;
|
||||
colors[3] = 0xFF202020;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user