add screen rotate support

This commit is contained in:
Qingping Hou
2012-06-13 00:14:23 +08:00
parent 4c71c628d3
commit 51ed793d14
6 changed files with 60 additions and 10 deletions

View File

@@ -43,6 +43,7 @@ function ReaderUI:init()
-- a view container (so it must be child #1!)
self[1] = ReaderView:new{
dialog = self.dialog,
dimen = self.dimen,
ui = self
}
-- rotation controller
@@ -114,6 +115,10 @@ function ReaderUI:init()
self:handleEvent(Event:new("SetDimensions", self.dimen))
end
function ReaderUI:onSetDimensions(dimen)
self.dimen = dimen
end
function ReaderUI:onClose()
DEBUG("closing reader")
if self.document then