mirror of
https://github.com/yggdrasil-network/yggdrasil-android.git
synced 2025-04-28 06:05:08 +03:00
Update SettingsActivity.kt
This commit is contained in:
parent
9cc150beb4
commit
d33984311a
1 changed files with 4 additions and 3 deletions
|
@ -57,11 +57,12 @@ class SettingsActivity : AppCompatActivity() {
|
|||
builder.show()
|
||||
}
|
||||
|
||||
publicKeyLabel.setOnClickListener {
|
||||
publicKeyLabel.setOnLongClickListener {
|
||||
val clipboard: ClipboardManager = getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
|
||||
val clip = ClipData.newPlainText("public key", publicKeyLabel.text)
|
||||
clipboard.setPrimaryClip(clip)
|
||||
Toast.makeText(applicationContext,R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(applicationContext,R.string.copied_to_clipboard, Toast.LENGTH_SHORT).show()
|
||||
true
|
||||
}
|
||||
|
||||
updateView()
|
||||
|
@ -77,4 +78,4 @@ class SettingsActivity : AppCompatActivity() {
|
|||
|
||||
publicKeyLabel.text = config.getJSON().getString("PublicKey")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue