mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
show a cross for removing selected contacts
This commit is contained in:
@@ -1167,6 +1167,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
val selectedAttendeeHolder = attendeeHolder.event_contact_attendee
|
val selectedAttendeeHolder = attendeeHolder.event_contact_attendee
|
||||||
val selectedAttendeeName = selectedAttendeeHolder.event_contact_name
|
val selectedAttendeeName = selectedAttendeeHolder.event_contact_name
|
||||||
val selectedAttendeeImage = attendeeHolder.event_contact_image
|
val selectedAttendeeImage = attendeeHolder.event_contact_image
|
||||||
|
val selectedAttendeeDismiss = attendeeHolder.event_contact_dismiss
|
||||||
|
|
||||||
mAttendeeViews.add(autoCompleteView)
|
mAttendeeViews.add(autoCompleteView)
|
||||||
autoCompleteView.onTextChangeListener {
|
autoCompleteView.onTextChangeListener {
|
||||||
@@ -1185,8 +1186,10 @@ class EventActivity : SimpleActivity() {
|
|||||||
selectedAttendeeHolder.layoutParams.height = autoCompleteView.height
|
selectedAttendeeHolder.layoutParams.height = autoCompleteView.height
|
||||||
}
|
}
|
||||||
|
|
||||||
autoCompleteView.setColors(config.textColor, getAdjustedPrimaryColor(), config.backgroundColor)
|
val textColor = config.textColor
|
||||||
selectedAttendeeName.setColors(config.textColor, getAdjustedPrimaryColor(), config.backgroundColor)
|
autoCompleteView.setColors(textColor, getAdjustedPrimaryColor(), config.backgroundColor)
|
||||||
|
selectedAttendeeName.setColors(textColor, getAdjustedPrimaryColor(), config.backgroundColor)
|
||||||
|
selectedAttendeeDismiss.applyColorFilter(textColor)
|
||||||
|
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
autoCompleteView.setText(value)
|
autoCompleteView.setText(value)
|
||||||
@@ -1205,6 +1208,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
selectedAttendeeHolder.beVisible()
|
selectedAttendeeHolder.beVisible()
|
||||||
selectedAttendeeImage.beVisible()
|
selectedAttendeeImage.beVisible()
|
||||||
selectedAttendee.updateImage(applicationContext, selectedAttendeeImage, mAttendeePlaceholder)
|
selectedAttendee.updateImage(applicationContext, selectedAttendeeImage, mAttendeePlaceholder)
|
||||||
|
selectedAttendeeDismiss.beVisible()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -43,10 +43,24 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_centerVertical="true"
|
android:layout_centerVertical="true"
|
||||||
android:layout_marginStart="@dimen/medium_margin"
|
android:layout_marginStart="@dimen/medium_margin"
|
||||||
|
android:layout_toStartOf="@+id/event_contact_dismiss"
|
||||||
android:layout_toEndOf="@+id/event_contact_image"
|
android:layout_toEndOf="@+id/event_contact_image"
|
||||||
|
android:ellipsize="end"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:textSize="@dimen/bigger_text_size"
|
android:textSize="@dimen/bigger_text_size"
|
||||||
tools:text="Simple Mobile"/>
|
tools:text="Simple Mobile"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/event_contact_dismiss"
|
||||||
|
android:layout_width="@dimen/avatar_size"
|
||||||
|
android:layout_height="@dimen/avatar_size"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_marginStart="@dimen/medium_margin"
|
||||||
|
android:layout_marginEnd="@dimen/normal_margin"
|
||||||
|
android:alpha="0.8"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:padding="@dimen/small_margin"
|
||||||
|
android:src="@drawable/ic_cross_big"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
Reference in New Issue
Block a user