lets actually remove the Call/Send action buttons from the Edit screen

This commit is contained in:
tibbi 2020-10-26 20:46:40 +01:00
parent fd52ddfedc
commit 0ddfbeb38b
2 changed files with 6 additions and 58 deletions

View File

@ -190,9 +190,6 @@ class EditContactActivity : ContactActivity() {
} }
setupTypePickers() setupTypePickers()
contact_send_sms.beVisibleIf(contact!!.phoneNumbers.isNotEmpty())
contact_start_call.beVisibleIf(contact!!.phoneNumbers.isNotEmpty())
contact_send_email.beVisibleIf(contact!!.emails.isNotEmpty())
if (contact!!.photoUri.isEmpty() && contact!!.photo == null) { if (contact!!.photoUri.isEmpty() && contact!!.photo == null) {
showPhotoPlaceholder(contact_photo) showPhotoPlaceholder(contact_photo)
@ -202,7 +199,7 @@ class EditContactActivity : ContactActivity() {
} }
val textColor = config.textColor val textColor = config.textColor
arrayOf(contact_send_sms, contact_start_call, contact_send_email, contact_name_image, contact_numbers_image, contact_emails_image, contact_addresses_image, arrayOf(contact_name_image, contact_numbers_image, contact_emails_image, contact_addresses_image,
contact_ims_image, contact_events_image, contact_notes_image, contact_organization_image, contact_websites_image, contact_groups_image, contact_ims_image, contact_events_image, contact_notes_image, contact_organization_image, contact_websites_image, contact_groups_image,
contact_source_image).forEach { contact_source_image).forEach {
it.applyColorFilter(textColor) it.applyColorFilter(textColor)
@ -222,9 +219,6 @@ class EditContactActivity : ContactActivity() {
contact_toggle_favorite.setOnClickListener { toggleFavorite() } contact_toggle_favorite.setOnClickListener { toggleFavorite() }
contact_photo.setOnClickListener { trySetPhoto() } contact_photo.setOnClickListener { trySetPhoto() }
contact_change_photo.setOnClickListener { trySetPhoto() } contact_change_photo.setOnClickListener { trySetPhoto() }
contact_send_sms.setOnClickListener { trySendSMS() }
contact_start_call.setOnClickListener { tryStartCall(contact!!) }
contact_send_email.setOnClickListener { trySendEmail() }
contact_numbers_add_new.setOnClickListener { addNewPhoneNumberField() } contact_numbers_add_new.setOnClickListener { addNewPhoneNumberField() }
contact_emails_add_new.setOnClickListener { addNewEmailField() } contact_emails_add_new.setOnClickListener { addNewEmailField() }
contact_addresses_add_new.setOnClickListener { addNewAddressField() } contact_addresses_add_new.setOnClickListener { addNewAddressField() }

View File

@ -49,60 +49,14 @@
android:id="@+id/contact_change_photo" android:id="@+id/contact_change_photo"
android:layout_width="@dimen/contact_actions_size" android:layout_width="@dimen/contact_actions_size"
android:layout_height="@dimen/contact_actions_size" android:layout_height="@dimen/contact_actions_size"
android:layout_above="@+id/contact_toggle_favorite" android:layout_alignEnd="@+id/contact_photo"
android:layout_alignStart="@+id/contact_photo" android:layout_alignBottom="@+id/contact_photo"
android:layout_marginStart="@dimen/medium_margin" android:layout_marginEnd="@dimen/medium_margin"
android:layout_marginBottom="@dimen/medium_margin"
android:background="?attr/selectableItemBackgroundBorderless" android:background="?attr/selectableItemBackgroundBorderless"
android:padding="@dimen/medium_margin" android:padding="@dimen/small_margin"
android:src="@drawable/ic_camera_vector" /> android:src="@drawable/ic_camera_vector" />
<LinearLayout
android:id="@+id/contact_actions_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@+id/contact_photo"
android:layout_alignBottom="@id/contact_photo"
android:gravity="bottom|end"
android:paddingEnd="@dimen/medium_margin"
android:paddingBottom="@dimen/medium_margin">
<ImageView
android:id="@+id/contact_send_email"
android:layout_width="@dimen/contact_actions_size"
android:layout_height="@dimen/contact_actions_size"
android:adjustViewBounds="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingStart="@dimen/small_margin"
android:paddingEnd="@dimen/small_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_email_vector" />
<ImageView
android:id="@+id/contact_start_call"
android:layout_width="@dimen/contact_actions_size"
android:layout_height="@dimen/contact_actions_size"
android:layout_marginStart="@dimen/normal_margin"
android:adjustViewBounds="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingStart="@dimen/small_margin"
android:paddingEnd="@dimen/small_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_phone_vector" />
<ImageView
android:id="@+id/contact_send_sms"
android:layout_width="@dimen/contact_actions_size"
android:layout_height="@dimen/contact_actions_size"
android:layout_marginStart="@dimen/normal_margin"
android:adjustViewBounds="true"
android:background="?attr/selectableItemBackgroundBorderless"
android:paddingStart="@dimen/small_margin"
android:paddingEnd="@dimen/small_margin"
android:scaleType="fitCenter"
android:src="@drawable/ic_sms_vector" />
</LinearLayout>
<ImageView <ImageView
android:id="@+id/contact_name_image" android:id="@+id/contact_name_image"
android:layout_width="@dimen/contact_icons_size" android:layout_width="@dimen/contact_icons_size"