|
|
@ -15,6 +15,7 @@ import android.text.Editable |
|
|
|
import android.text.InputType |
|
|
|
import android.text.SpannableStringBuilder |
|
|
|
import android.text.TextWatcher |
|
|
|
import android.util.Log |
|
|
|
import android.view.inputmethod.EditorInfo |
|
|
|
import android.view.inputmethod.InputMethodManager |
|
|
|
import android.widget.TextView |
|
|
@ -24,10 +25,10 @@ import kotlinx.android.synthetic.main.activity_send.* |
|
|
|
import kotlinx.android.synthetic.main.content_send.* |
|
|
|
import java.text.DecimalFormat |
|
|
|
|
|
|
|
|
|
|
|
class SendActivity : AppCompatActivity() { |
|
|
|
|
|
|
|
private val REQUEST_CONFIRM = 2 |
|
|
|
private val TAG = "SendActivity" |
|
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) { |
|
|
|
super.onCreate(savedInstanceState) |
|
|
@ -51,7 +52,7 @@ class SendActivity : AppCompatActivity() { |
|
|
|
if (intent.getBooleanExtra("includeReplyTo", false)) |
|
|
|
chkIncludeReplyTo.isChecked = true |
|
|
|
|
|
|
|
imageButton.setOnClickListener { view -> |
|
|
|
imageButton.setOnClickListener { |
|
|
|
val intent = Intent(this, QrReaderActivity::class.java) |
|
|
|
intent.putExtra("REQUEST_CODE", |
|
|
|
QrReaderActivity.REQUEST_ADDRESS |
|
|
@ -264,6 +265,7 @@ class SendActivity : AppCompatActivity() { |
|
|
|
when (requestCode) { |
|
|
|
QrReaderActivity.REQUEST_ADDRESS -> { |
|
|
|
if (resultCode == Activity.RESULT_OK) { |
|
|
|
Log.i(TAG, "Send Activity got result for QrCode: ${data?.dataString}") |
|
|
|
if (data?.scheme == "hush") { |
|
|
|
sendAddress.setText(data.data?.host ?: "", TextView.BufferType.EDITABLE) |
|
|
|
|
|
|
|