To use a DrawerLayout, position your primary content view as the first child with a width and height of match_parent. Add drawers as child views after the main content view and set the layout_gravity appropriately. Drawers commonly use match_parent for height with a fixed width
要使用DrawerLayout,请将主要内容视图定位为宽度和高度为match_parent的第一个子视图。 在主内容视图后添加抽屉作为子视图,并相应地设置layout_gravity。 抽屉通常使用match_parent作为具有固定宽度的高度