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 Contact contact;
|
||||||
protected BitmapCache mBitmapCache = new BitmapCache();
|
protected BitmapCache mBitmapCache = new BitmapCache();
|
||||||
|
|
||||||
|
protected int mPrimaryTextColor;
|
||||||
|
protected int mSecondaryTextColor;
|
||||||
|
|
||||||
protected String queuedPqpMessage = null;
|
protected String queuedPqpMessage = null;
|
||||||
|
|
||||||
private EditText chatMsg;
|
private EditText chatMsg;
|
||||||
|
@ -177,6 +180,9 @@ public class ConversationFragment extends Fragment {
|
||||||
|
|
||||||
this.inflater = inflater;
|
this.inflater = inflater;
|
||||||
|
|
||||||
|
mPrimaryTextColor = getResources().getColor(R.color.primarytext);
|
||||||
|
mSecondaryTextColor = getResources().getColor(R.color.secondarytext);
|
||||||
|
|
||||||
final View view = inflater.inflate(R.layout.fragment_conversation,
|
final View view = inflater.inflate(R.layout.fragment_conversation,
|
||||||
container, false);
|
container, false);
|
||||||
chatMsg = (EditText) view.findViewById(R.id.textinput);
|
chatMsg = (EditText) view.findViewById(R.id.textinput);
|
||||||
|
@ -264,7 +270,7 @@ public class ConversationFragment extends Fragment {
|
||||||
if (error) {
|
if (error) {
|
||||||
viewHolder.time.setTextColor(0xFFe92727);
|
viewHolder.time.setTextColor(0xFFe92727);
|
||||||
} else {
|
} else {
|
||||||
viewHolder.time.setTextColor(0xFF8e8e8e);
|
viewHolder.time.setTextColor(mSecondaryTextColor);
|
||||||
}
|
}
|
||||||
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
|
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
|
||||||
viewHolder.indicator.setVisibility(View.GONE);
|
viewHolder.indicator.setVisibility(View.GONE);
|
||||||
|
@ -341,7 +347,7 @@ public class ConversationFragment extends Fragment {
|
||||||
} else {
|
} else {
|
||||||
viewHolder.messageBody.setText("");
|
viewHolder.messageBody.setText("");
|
||||||
}
|
}
|
||||||
viewHolder.messageBody.setTextColor(0xff333333);
|
viewHolder.messageBody.setTextColor(mPrimaryTextColor);
|
||||||
viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
|
viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
|
||||||
viewHolder.messageBody.setTextIsSelectable(true);
|
viewHolder.messageBody.setTextIsSelectable(true);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ import android.widget.TextView;
|
||||||
|
|
||||||
public class UIHelper {
|
public class UIHelper {
|
||||||
private static final int BG_COLOR = 0xFF181818;
|
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 TRANSPARENT = 0x00000000;
|
||||||
private static final int DATE_NO_YEAR_FLAGS = DateUtils.FORMAT_SHOW_DATE
|
private static final int DATE_NO_YEAR_FLAGS = DateUtils.FORMAT_SHOW_DATE
|
||||||
| DateUtils.FORMAT_NO_YEAR | DateUtils.FORMAT_ABBREV_ALL;
|
| DateUtils.FORMAT_NO_YEAR | DateUtils.FORMAT_ABBREV_ALL;
|
||||||
|
@ -120,8 +120,9 @@ public class UIHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int getNameColor(String name) {
|
private static int getNameColor(String name) {
|
||||||
int holoColors[] = { 0xFF1da9da, 0xFFb368d9, 0xFF83b600, 0xFFffa713,
|
/*int holoColors[] = { 0xFF1da9da, 0xFFb368d9, 0xFF83b600, 0xFFffa713,
|
||||||
0xFFe92727 };
|
0xFFe92727 };*/
|
||||||
|
int holoColors[] = {0xFFe91e63, 0xFF9c27b0, 0xFF673ab7, 0xFF3f51b5, 0xFF5677fc, 0xFF03a9f4, 0xFF00bcd4, 0xFF009688, 0xFFff5722, 0xFF795548, 0xFF607d8b};
|
||||||
return holoColors[(int) ((name.hashCode() & 0xffffffffl) % holoColors.length)];
|
return holoColors[(int) ((name.hashCode() & 0xffffffffl) % holoColors.length)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +166,7 @@ public class UIHelper {
|
||||||
|
|
||||||
if (names.length > 4) {
|
if (names.length > 4) {
|
||||||
letters[3] = "\u2026"; // Unicode ellipsis
|
letters[3] = "\u2026"; // Unicode ellipsis
|
||||||
colors[3] = 0xFF444444;
|
colors[3] = 0xFF202020;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue