Skip to content

Commit

Permalink
[Android] fix: screen height wrong. Not catering correctly for action…
Browse files Browse the repository at this point in the history
… bar. Height was wrong after pushing and popping screens with different combinations of bar being shown/hidden
  • Loading branch information
hboon committed Dec 17, 2016
1 parent b88aaad commit 56835b3
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions flow/ui/android/navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ def hide_bar
if bar.isShowing
bar.hide
Task.after 0.05 do
screen = @current_screens.last
bar_height = bar.height>0 ? bar.height : self.class.bar_height
screen.view.height += (bar_height / UI.density)
screen.view.update_layout
@current_screens.each do |e|
e.view.height += (bar_height / UI.density)
e.view.update_layout
end
end
end
end
Expand All @@ -44,10 +45,11 @@ def show_bar
if !bar.isShowing
bar.show
Task.after 0.05 do
screen = @current_screens.last
bar_height = bar.height>0 ? bar.height : self.class.bar_height
screen.view.height -= (bar_height / UI.density)
screen.view.update_layout
@current_screens.each do |e|
e.view.height -= (bar_height / UI.density)
e.view.update_layout
end
end
end
end
Expand Down

0 comments on commit 56835b3

Please sign in to comment.