Layoutlib currently does not implement menus for the support Toolbar. When it detects that an AppCompat theme is being used, it will try to use by default the support Toolbar which breaks the display of menus. This works around the problem by forcing layoutlib to use the framework toolbar in menu previews (regular activities won't display the menu if they use AppCompat). Bug: http://b.android.com/210946 Change-Id: Ic1d162c6d74119ef42895776c3bc3851a9549120
Layoutlib is a custom version of the android View framework designed to run inside Eclipse. The goal of the library is to provide layout rendering in Eclipse that are very very close to their rendering on devices. None of the com.android.* or android.* classes in layoutlib run on devices.