icon, contact list and conversation redesign

This commit is contained in:
Jake McGinty
2014-01-08 12:29:05 -10:00
parent 75ce00cb90
commit 28c1c5006b
119 changed files with 31542 additions and 233 deletions

View File

@@ -17,10 +17,12 @@
package org.thoughtcrime.securesms.database.model;
import android.content.Context;
import android.graphics.Color;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.text.style.TextAppearanceSpan;
import org.thoughtcrime.securesms.database.MmsSmsColumns;
import org.thoughtcrime.securesms.database.SmsDatabase;
@@ -125,7 +127,7 @@ public abstract class MessageRecord extends DisplayRecord {
protected SpannableString emphasisAdded(String sequence) {
SpannableString spannable = new SpannableString(sequence);
spannable.setSpan(new ForegroundColorSpan(context.getResources().getColor(android.R.color.darker_gray)), 0, sequence.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
spannable.setSpan(new TextAppearanceSpan(context, android.R.style.TextAppearance_Small), 0, sequence.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
spannable.setSpan(new StyleSpan(android.graphics.Typeface.ITALIC), 0, sequence.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
return spannable;

View File

@@ -53,7 +53,7 @@ public class SmsMessageRecord extends MessageRecord {
@Override
public SpannableString getDisplayBody() {
if (isProcessedKeyExchange()) {
return emphasisAdded(context.getString(R.string.ConversationItem_received_and_processed_key_exchange_message));
return new SpannableString("");
} else if (isStaleKeyExchange()) {
return emphasisAdded(context.getString(R.string.ConversationItem_error_received_stale_key_exchange_message));
} else if (isCorruptedKeyExchange()) {
@@ -63,7 +63,7 @@ public class SmsMessageRecord extends MessageRecord {
} else if (isBundleKeyExchange()) {
return emphasisAdded(context.getString(R.string.SmsMessageRecord_received_message_with_unknown_identity_key_click_to_process));
} else if (isKeyExchange() && isOutgoing()) {
return emphasisAdded(context.getString(R.string.ConversationListAdapter_key_exchange_message));
return new SpannableString("");
} else if (isKeyExchange() && !isOutgoing()) {
return emphasisAdded(context.getString(R.string.ConversationItem_received_key_exchange_message_click_to_process));
} else if (SmsDatabase.Types.isFailedDecryptType(type)) {