hide keyboard on a couple more places

This commit is contained in:
tibbi 2022-06-12 11:37:28 +02:00
parent ea0e3d7a4c
commit d2266063b7
2 changed files with 5 additions and 0 deletions

View File

@ -357,6 +357,7 @@ class EditContactActivity : ContactActivity() {
imageUri = getCachePhotoUri(newFile)
}
hideKeyboard()
lastPhotoIntentUri = getCachePhotoUri()
Intent("com.android.camera.action.CROP").apply {
setDataAndType(imageUri, "image/*")
@ -599,6 +600,7 @@ class EditContactActivity : ContactActivity() {
private fun setupRingtone() {
contact_ringtone.setOnClickListener {
hideKeyboard()
val ringtonePickerIntent = getRingtonePickerIntent()
try {
startActivityForResult(ringtonePickerIntent, INTENT_SELECT_RINGTONE)
@ -1441,6 +1443,7 @@ class EditContactActivity : ContactActivity() {
}
private fun startTakePhotoIntent() {
hideKeyboard()
val uri = getCachePhotoUri()
lastPhotoIntentUri = uri
Intent(MediaStore.ACTION_IMAGE_CAPTURE).apply {
@ -1457,6 +1460,7 @@ class EditContactActivity : ContactActivity() {
}
private fun startChoosePhotoIntent() {
hideKeyboard()
val uri = getCachePhotoUri()
lastPhotoIntentUri = uri
Intent(Intent.ACTION_PICK).apply {

View File

@ -208,6 +208,7 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
val currAdapter = fragment_list.adapter
if (currAdapter == null) {
GroupsAdapter(activity as SimpleActivity, storedGroups, activity as RefreshContactsListener, fragment_list) {
activity?.hideKeyboard()
Intent(activity, GroupContactsActivity::class.java).apply {
putExtra(GROUP, it as Group)
activity!!.startActivity(this)