Backport to android-8 (2.2)
Adapt main panel layout to a smartphone screen