allow adding not saved contacts to group threads
This commit is contained in:
parent
8f913867f4
commit
956e798558
|
@ -176,8 +176,18 @@ class ThreadActivity : SimpleActivity() {
|
|||
val selectedContact = currContacts[position]
|
||||
addSelectedContact(selectedContact)
|
||||
}
|
||||
|
||||
add_contact_or_number.onTextChangeListener {
|
||||
confirm_inserted_number.beVisibleIf(it.length > 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
confirm_inserted_number.setOnClickListener {
|
||||
val number = add_contact_or_number.value
|
||||
val contact = Contact(number.hashCode(), number, "", number)
|
||||
addSelectedContact(contact)
|
||||
}
|
||||
}
|
||||
|
||||
private fun setupButtons() {
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
android:layout_below="@+id/message_divider_one"
|
||||
android:layout_marginStart="@dimen/activity_margin"
|
||||
android:layout_marginEnd="@dimen/activity_margin"
|
||||
android:layout_toStartOf="@+id/confirm_inserted_number"
|
||||
android:background="@android:color/transparent"
|
||||
android:completionThreshold="2"
|
||||
android:gravity="center_vertical"
|
||||
|
@ -55,6 +56,21 @@
|
|||
android:inputType="textCapWords"
|
||||
android:textSize="@dimen/big_text_size" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/confirm_inserted_number"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignTop="@+id/add_contact_or_number"
|
||||
android:layout_alignBottom="@+id/add_contact_or_number"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginStart="@dimen/medium_margin"
|
||||
android:layout_marginEnd="@dimen/medium_margin"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:paddingStart="@dimen/medium_margin"
|
||||
android:paddingEnd="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_check_vector"
|
||||
android:visibility="gone" />
|
||||
|
||||
<View
|
||||
android:id="@+id/message_divider_two"
|
||||
android:layout_width="match_parent"
|
||||
|
|
Loading…
Reference in New Issue