Fixed a bug where AppBar was still showing

The bug was due to the LayoutParams,width having the value 0. That
caused the view not to update properly.