rename android_back to back_handler

This commit is contained in:
Insality
2019-09-25 20:13:05 +03:00
parent 099eaa1e10
commit a4bc3bb5a1
2 changed files with 1 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
local data = require("druid.data")
local M = {}
M.interest = {
data.ON_INPUT
}
function M.init(self, callback, params)
self.event = data.A_ANDR_BACK
self.callback = callback
self.params = params
end
--- input handler
-- @param action_id - input action id
-- @param action - input action
function M.on_input(self, action_id, action)
if action[data.RELEASED] then
self.callback(self.parent.parent, self.params)
end
return true
end
return M