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

View File

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