diff options
| author | Albin <albin@mullvad.net> | 2022-07-25 15:05:33 +0200 |
|---|---|---|
| committer | Albin <albin@mullvad.net> | 2022-07-25 15:07:51 +0200 |
| commit | 7896855db010377fbdfc64900ca7d7a790a87523 (patch) | |
| tree | 84df54acfbef352cb9267c545b32e49ba8e65132 /android/app/src/main/kotlin | |
| parent | 81414c799c5ea89feed0ea92552285ba3e2757d6 (diff) | |
| download | mullvadvpn-7896855db010377fbdfc64900ca7d7a790a87523.tar.xz mullvadvpn-7896855db010377fbdfc64900ca7d7a790a87523.zip | |
Add copy icon/button to account view
Diffstat (limited to 'android/app/src/main/kotlin')
| -rw-r--r-- | android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CopyableInformationView.kt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CopyableInformationView.kt b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CopyableInformationView.kt index a3f43fbac2..e19edc9d34 100644 --- a/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CopyableInformationView.kt +++ b/android/app/src/main/kotlin/net/mullvad/mullvadvpn/ui/widget/CopyableInformationView.kt @@ -4,6 +4,8 @@ import android.content.ClipData import android.content.ClipboardManager import android.content.Context import android.util.AttributeSet +import android.view.View +import android.widget.ImageButton import android.widget.Toast import net.mullvad.mullvadvpn.R @@ -38,6 +40,11 @@ class CopyableInformationView : InformationView { init { onClick = { copyToClipboard() } + + findViewById<ImageButton>(R.id.copy_button).apply { + visibility = View.VISIBLE + setOnClickListener { copyToClipboard() } + } } private fun loadAttributes(attributes: AttributeSet) { |
