Log type styling

pull/204/head
M66B 3 years ago
parent 7a65030c0b
commit ec526498d1

@ -20,8 +20,10 @@ package eu.faircode.email;
*/ */
import android.content.Context; import android.content.Context;
import android.graphics.Typeface;
import android.text.SpannableStringBuilder; import android.text.SpannableStringBuilder;
import android.text.style.ForegroundColorSpan; import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -78,21 +80,19 @@ public class AdapterLog extends RecyclerView.Adapter<AdapterLog.ViewHolder> {
case General: case General:
break; break;
case Statistics: case Statistics:
ssb.setSpan(new ForegroundColorSpan(colorAccent), 0, ssb.length(), 0); ssb.setSpan(new StyleSpan(Typeface.ITALIC), 0, ssb.length(), 0);
break; break;
case Scheduling: case Scheduling:
case Account:
ssb.setSpan(new ForegroundColorSpan(colorWarning), 0, ssb.length(), 0); ssb.setSpan(new ForegroundColorSpan(colorWarning), 0, ssb.length(), 0);
break; break;
case Network: case Network:
ssb.setSpan(new ForegroundColorSpan(colorWarning), 0, ssb.length(), 0);
break;
case Account:
ssb.setSpan(new ForegroundColorSpan(colorAccent), 0, ssb.length(), 0);
break;
case Protocol: case Protocol:
ssb.setSpan(new ForegroundColorSpan(textColorSecondary), 0, ssb.length(), 0); ssb.setSpan(new ForegroundColorSpan(textColorSecondary), 0, ssb.length(), 0);
break; break;
case Classification: case Classification:
case Notification:
case Rules:
ssb.setSpan(new ForegroundColorSpan(colorAccent), 0, ssb.length(), 0); ssb.setSpan(new ForegroundColorSpan(colorAccent), 0, ssb.length(), 0);
break; break;
} }

Loading…
Cancel
Save