mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-01 04:12:12 +00:00
Add paste key and slightly re-arrange toolbar keys (#945)
This commit is contained in:
parent
cc4d8cfedc
commit
0bd76de9d9
10 changed files with 67 additions and 31 deletions
|
@ -199,12 +199,12 @@ class ClipboardHistoryManager(
|
|||
val binding = ClipboardSuggestionBinding.inflate(LayoutInflater.from(latinIME), parent, false)
|
||||
val textView = binding.clipboardSuggestionText
|
||||
textView.text = if (isClipSensitive(inputType)) "*".repeat(content.length) else content
|
||||
val clipIcon = latinIME.mKeyboardSwitcher.keyboard.mIconsSet.getIconDrawable(ToolbarKey.CLIPBOARD.name.lowercase())
|
||||
val clipIcon = latinIME.mKeyboardSwitcher.keyboard.mIconsSet.getIconDrawable(ToolbarKey.PASTE.name.lowercase())
|
||||
textView.setCompoundDrawablesRelativeWithIntrinsicBounds(clipIcon, null, null, null)
|
||||
textView.setOnClickListener {
|
||||
dontShowCurrentSuggestion = true
|
||||
latinIME.onTextInput(content.toString())
|
||||
AudioAndHapticFeedbackManager.getInstance().performHapticAndAudioFeedback(KeyCode.NOT_SPECIFIED, it);
|
||||
AudioAndHapticFeedbackManager.getInstance().performHapticAndAudioFeedback(KeyCode.NOT_SPECIFIED, it)
|
||||
binding.root.isGone = true
|
||||
}
|
||||
val closeButton = binding.clipboardSuggestionClose
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue