mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
10
briar-android/res/drawable/ic_our_identity_black.xml
Normal file
10
briar-android/res/drawable/ic_our_identity_black.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="16dp"
|
||||
android:height="16dp"
|
||||
android:alpha="0.54"
|
||||
android:viewportHeight="24.0"
|
||||
android:viewportWidth="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,5.9c1.16,0 2.1,0.94 2.1,2.1s-0.94,2.1 -2.1,2.1S9.9,9.16 9.9,8s0.94,-2.1 2.1,-2.1m0,9c2.97,0 6.1,1.46 6.1,2.1v1.1L5.9,18.1L5.9,17c0,-0.64 3.13,-2.1 6.1,-2.1M12,4C9.79,4 8,5.79 8,8s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM12,13c-2.67,0 -8,1.34 -8,4v3h16v-3c0,-2.66 -5.33,-4 -8,-4z"/>
|
||||
</vector>
|
||||
@@ -1,13 +1,9 @@
|
||||
package org.briarproject.android.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v7.widget.AppCompatTextView;
|
||||
import android.graphics.Typeface;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -18,6 +14,8 @@ import org.briarproject.api.identity.Author.Status;
|
||||
import de.hdodenhof.circleimageview.CircleImageView;
|
||||
import im.delight.android.identicons.IdenticonDrawable;
|
||||
|
||||
import static org.briarproject.api.identity.Author.Status.OURSELVES;
|
||||
|
||||
public class AuthorView extends RelativeLayout {
|
||||
|
||||
private final CircleImageView avatar;
|
||||
@@ -51,6 +49,12 @@ public class AuthorView extends RelativeLayout {
|
||||
|
||||
public void setAuthorStatus(Status status) {
|
||||
trustIndicator.setTrustLevel(status);
|
||||
if (status == OURSELVES) {
|
||||
authorName.setTypeface(authorName.getTypeface(), Typeface.BOLD);
|
||||
}
|
||||
|
||||
invalidate();
|
||||
requestLayout();
|
||||
}
|
||||
|
||||
public void setDate(long date) {
|
||||
|
||||
@@ -26,11 +26,6 @@ public class TrustIndicatorView extends ImageView {
|
||||
}
|
||||
|
||||
public void setTrustLevel(Status status) {
|
||||
if (status == OURSELVES) {
|
||||
setVisibility(GONE);
|
||||
return;
|
||||
}
|
||||
|
||||
int res;
|
||||
switch (status) {
|
||||
case ANONYMOUS:
|
||||
@@ -42,6 +37,9 @@ public class TrustIndicatorView extends ImageView {
|
||||
case VERIFIED:
|
||||
res = R.drawable.trust_indicator_verified;
|
||||
break;
|
||||
case OURSELVES:
|
||||
res = R.drawable.ic_our_identity_black;
|
||||
break;
|
||||
default:
|
||||
res = R.drawable.trust_indicator_unknown;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user