Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e84b7948 authored by Robert Spencer's avatar Robert Spencer
Browse files

Use rounded images for selecting recipients, and for the recipient list.

parent b083bb01
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.inputmethod.InputMethodManager;
import android.widget.ImageView;
import android.widget.ListPopupWindow;
import android.widget.ListView;
import android.widget.TextView;
@@ -43,6 +42,7 @@ import com.fsck.k9.view.RecipientSelectView.Recipient;
import com.tokenautocomplete.TokenCompleteTextView;
import org.apache.james.mime4j.util.CharsetUtil;
import timber.log.Timber;
import de.hdodenhof.circleimageview.CircleImageView;


public class RecipientSelectView extends TokenCompleteTextView<Recipient> implements LoaderCallbacks<List<Recipient>>,
@@ -120,7 +120,10 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem
    @SuppressLint("InflateParams")
    private View inflateLayout() {
        LayoutInflater layoutInflater = LayoutInflater.from(getContext());
        return layoutInflater.inflate(R.layout.recipient_token_item, null, false);
        View layout = layoutInflater.inflate(R.layout.recipient_token_item, null, false);
        View contactPhoto = layout.findViewById(R.id.contact_photo);
        contactPhoto.setZ(1.f);
        return layout;
    }

    private void bindObjectView(Recipient recipient, View view) {
@@ -536,7 +539,7 @@ public class RecipientSelectView extends TokenCompleteTextView<Recipient> implem

    private static class RecipientTokenViewHolder {
        final TextView vName;
        final ImageView vContactPhoto;
        final CircleImageView vContactPhoto;
        final View cryptoStatusRed;
        final View cryptoStatusOrange;
        final View cryptoStatusGreen;
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
    android:gravity="center"
    android:orientation="horizontal">

    <ImageView
    <de.hdodenhof.circleimageview.CircleImageView
        android:layout_width="36dp"
        android:layout_height="36dp"
        android:layout_marginLeft="12dp"
+81 −73
Original line number Diff line number Diff line
@@ -3,10 +3,9 @@
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="horizontal"
    android:layout_width="wrap_content"
    android:layout_height="32dp"
    android:background="?attr/contactTokenBackgroundColor">
    android:layout_height="32dp">

    <ImageView
    <de.hdodenhof.circleimageview.CircleImageView
        android:layout_width="32dp"
        android:layout_height="32dp"
        android:gravity="center_vertical"
@@ -14,12 +13,19 @@
        tools:src="@drawable/ic_contact_picture"
        />

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="?attr/contactTokenBackgroundColor"
        android:layout_marginLeft="-16dp"
        >

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:id="@android:id/text1"
            android:layout_gravity="center_vertical"
        android:layout_marginLeft="8dp"
            android:layout_marginLeft="24dp"
            android:layout_marginRight="8dp"
            android:maxLines="1"
            android:ellipsize="end"
@@ -93,3 +99,5 @@
            />

    </LinearLayout>

</LinearLayout>
 No newline at end of file