[android] show less obstrusive remove button for pending contacts

This uses the same button as the RSS feed items
parent 66652357
Pipeline #3504 passed with stage
in 7 minutes and 52 seconds
package org.briarproject.briar.android.contact.add.remote;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.AppCompatImageButton;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import org.briarproject.bramble.api.contact.PendingContact;
......@@ -21,7 +21,7 @@ class PendingContactViewHolder extends ViewHolder {
private final TextView name;
private final TextView time;
private final TextView status;
private final Button removeButton;
private final AppCompatImageButton removeButton;
PendingContactViewHolder(View v, PendingContactListener listener) {
super(v);
......
......@@ -22,33 +22,43 @@
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/margin_large"
android:layout_marginLeft="@dimen/margin_large"
android:layout_marginRight="@dimen/margin_large"
android:layout_marginStart="@dimen/margin_large"
android:layout_marginTop="@dimen/margin_large"
android:textColor="?android:attr/textColorPrimary"
android:textSize="@dimen/text_size_medium"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toTopOf="@+id/status"
app:layout_constraintEnd_toStartOf="@+id/time"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintEnd_toStartOf="@+id/removeButton"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toEndOf="@+id/avatar"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="This is a name of a contact"/>
<android.support.v7.widget.AppCompatImageButton
android:id="@+id/removeButton"
android:layout_width="@dimen/button_size"
android:layout_height="@dimen/button_size"
android:background="?attr/selectableItemBackgroundBorderless"
android:contentDescription="@string/groups_remove"
android:src="@drawable/action_delete_black"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/name"
app:layout_constraintTop_toTopOf="parent"
app:tint="?attr/colorControlNormal"/>
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginEnd="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="8dp"
android:text="@string/adding_contact_failed"
app:layout_constrainedWidth="true"
app:layout_constraintEnd_toStartOf="@+id/removeButton"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintEnd_toStartOf="@+id/time"
app:layout_constraintStart_toStartOf="@+id/name"
app:layout_constraintTop_toBottomOf="@+id/name"
tools:textColor="@color/briar_red"/>
......@@ -57,35 +67,27 @@
android:id="@+id/time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_large"
android:layout_marginEnd="@dimen/margin_large"
android:layout_marginRight="@dimen/margin_large"
android:layout_marginTop="0dp"
android:textColor="?android:attr/textColorSecondary"
android:textSize="@dimen/text_size_small"
app:layout_constraintBottom_toBottomOf="@+id/status"
app:layout_constraintBottom_toTopOf="@+id/divider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/name"
app:layout_constraintTop_toTopOf="@+id/name"
app:layout_constraintStart_toEndOf="@+id/status"
app:layout_constraintTop_toTopOf="@+id/status"
app:layout_constraintVertical_bias="0.0"
tools:text="Dec 24"/>
<Button
android:id="@+id/removeButton"
style="@style/BriarButtonFlat.Negative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/groups_remove"
app:layout_constraintEnd_toEndOf="@+id/time"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/time"/>
<View
android:id="@+id/divider"
style="@style/Divider.ContactList"
android:layout_width="0dp"
android:layout_marginLeft="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="@dimen/margin_large"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/avatar"
app:layout_constraintTop_toBottomOf="@+id/removeButton"
app:layout_goneMarginTop="@dimen/margin_large"/>
app:layout_constraintTop_toBottomOf="@+id/status"/>
</android.support.constraint.ConstraintLayout>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment