mirror of
https://github.com/koreader/koreader
synced 2024-10-31 21:20:20 +00:00
android: share text (#5745)
This commit is contained in:
parent
4e5779199d
commit
5ef329c19c
@ -498,6 +498,17 @@ function ReaderHighlight:onShowHighlightMenu()
|
||||
},
|
||||
})
|
||||
end
|
||||
if Device:canShareText() then
|
||||
table.insert(highlight_buttons, {
|
||||
{
|
||||
text = _("Share text"),
|
||||
callback = function()
|
||||
Device.doShareText(self.selected_text.text)
|
||||
end,
|
||||
},
|
||||
})
|
||||
end
|
||||
|
||||
self.highlight_dialog = ButtonDialog:new{
|
||||
buttons = highlight_buttons,
|
||||
tap_close_callback = function() self:handleEvent(Event:new("Tap")) end,
|
||||
|
@ -86,6 +86,8 @@ local Device = Generic:new{
|
||||
canImportFiles = function() return android.app.activity.sdkVersion >= 19 end,
|
||||
importFile = function(path) android.importFile(path) end,
|
||||
isValidPath = function(path) return android.isPathInsideSandbox(path) end,
|
||||
canShareText = yes,
|
||||
doShareText = function(text) android.sendText(text) end,
|
||||
|
||||
canExternalDictLookup = yes,
|
||||
getExternalDictLookupList = getExternalDicts,
|
||||
|
@ -46,6 +46,7 @@ local Device = {
|
||||
hasColorScreen = no,
|
||||
hasBGRFrameBuffer = no,
|
||||
canImportFiles = no,
|
||||
canShareText = no,
|
||||
canToggleGSensor = no,
|
||||
canToggleMassStorage = no,
|
||||
canUseWAL = yes, -- requires mmap'ed I/O on the target FS
|
||||
|
Loading…
Reference in New Issue
Block a user