Hide keyboard before going to key pair screen

This commit is contained in:
Niels Andriesse 2019-06-20 14:25:38 +10:00
parent 3afd8b8b7f
commit bd00013f02

View File

@ -2,12 +2,14 @@ package org.thoughtcrime.securesms.loki
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.view.inputmethod.InputMethodManager
import kotlinx.android.synthetic.main.activity_account_details.* import kotlinx.android.synthetic.main.activity_account_details.*
import org.thoughtcrime.securesms.BaseActionBarActivity import org.thoughtcrime.securesms.BaseActionBarActivity
import org.thoughtcrime.securesms.R import org.thoughtcrime.securesms.R
import org.thoughtcrime.securesms.util.TextSecurePreferences import org.thoughtcrime.securesms.util.TextSecurePreferences
import org.whispersystems.signalservice.api.crypto.ProfileCipher import org.whispersystems.signalservice.api.crypto.ProfileCipher
class AccountDetailsActivity : BaseActionBarActivity() { class AccountDetailsActivity : BaseActionBarActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
@ -26,6 +28,8 @@ class AccountDetailsActivity : BaseActionBarActivity() {
TextSecurePreferences.setProfileName(this, name) TextSecurePreferences.setProfileName(this, name)
} }
} }
val inputMethodManager = getSystemService(INPUT_METHOD_SERVICE) as InputMethodManager
inputMethodManager.hideSoftInputFromWindow(nameEditText.windowToken, 0)
startActivity(Intent(this, KeyPairActivity::class.java)) startActivity(Intent(this, KeyPairActivity::class.java))
finish() finish()
} }