adding a Change Photo button at the edit screen
This commit is contained in:
parent
5800e8ae2e
commit
fd52ddfedc
|
@ -221,6 +221,7 @@ 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_send_sms.setOnClickListener { trySendSMS() }
|
contact_send_sms.setOnClickListener { trySendSMS() }
|
||||||
contact_start_call.setOnClickListener { tryStartCall(contact!!) }
|
contact_start_call.setOnClickListener { tryStartCall(contact!!) }
|
||||||
contact_send_email.setOnClickListener { trySendEmail() }
|
contact_send_email.setOnClickListener { trySendEmail() }
|
||||||
|
@ -1136,7 +1137,10 @@ class EditContactActivity : ContactActivity() {
|
||||||
when (it as Int) {
|
when (it as Int) {
|
||||||
TAKE_PHOTO -> startTakePhotoIntent()
|
TAKE_PHOTO -> startTakePhotoIntent()
|
||||||
CHOOSE_PHOTO -> startChoosePhotoIntent()
|
CHOOSE_PHOTO -> startChoosePhotoIntent()
|
||||||
else -> showPhotoPlaceholder(contact_photo)
|
else -> {
|
||||||
|
showPhotoPlaceholder(contact_photo)
|
||||||
|
contact_photo_bottom_shadow.beGone()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,11 +39,23 @@
|
||||||
android:layout_height="@dimen/contact_actions_size"
|
android:layout_height="@dimen/contact_actions_size"
|
||||||
android:layout_alignStart="@+id/contact_photo"
|
android:layout_alignStart="@+id/contact_photo"
|
||||||
android:layout_alignBottom="@id/contact_photo"
|
android:layout_alignBottom="@id/contact_photo"
|
||||||
android:layout_margin="@dimen/medium_margin"
|
android:layout_marginStart="@dimen/medium_margin"
|
||||||
|
android:layout_marginBottom="@dimen/medium_margin"
|
||||||
android:background="?attr/selectableItemBackgroundBorderless"
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
android:padding="@dimen/tiny_margin"
|
android:padding="@dimen/tiny_margin"
|
||||||
android:src="@drawable/ic_star_off_vector" />
|
android:src="@drawable/ic_star_off_vector" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/contact_change_photo"
|
||||||
|
android:layout_width="@dimen/contact_actions_size"
|
||||||
|
android:layout_height="@dimen/contact_actions_size"
|
||||||
|
android:layout_above="@+id/contact_toggle_favorite"
|
||||||
|
android:layout_alignStart="@+id/contact_photo"
|
||||||
|
android:layout_marginStart="@dimen/medium_margin"
|
||||||
|
android:background="?attr/selectableItemBackgroundBorderless"
|
||||||
|
android:padding="@dimen/medium_margin"
|
||||||
|
android:src="@drawable/ic_camera_vector" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/contact_actions_holder"
|
android:id="@+id/contact_actions_holder"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
Loading…
Reference in New Issue