Add copy to clipboard functionality for unit converter
This commit is contained in:
parent
b6ba9b800c
commit
31fcd94ecf
|
@ -51,6 +51,14 @@ class ConverterView @JvmOverloads constructor(
|
|||
|
||||
binding.topUnitHolder.setClickListenerForUnitSelector(::topUnit, ::bottomUnit)
|
||||
binding.bottomUnitHolder.setClickListenerForUnitSelector(::bottomUnit, ::topUnit)
|
||||
binding.topUnitHolder.setOnLongClickListener {
|
||||
context.copyToClipboard(binding.topUnitText.text.toString())
|
||||
true
|
||||
}
|
||||
binding.bottomUnitHolder.setOnLongClickListener {
|
||||
context.copyToClipboard(binding.bottomUnitText.text.toString())
|
||||
true
|
||||
}
|
||||
|
||||
updateColors()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue