Compartilhar via


Drawer de tela dupla do Fluent UI

A gaveta é exibida por padrão na tela à direita:

Surface Duo with drawer control showing

Para usar o Drawer ou DrawerDialog do Fluent UI, configure seu arquivo gradle e importe as classes necessárias:

import com.microsoft.fluentui.drawer.Drawer
import com.microsoft.fluentui.drawer.DrawerDialog
import com.microsoft.fluentui.drawer.OnDrawerContentCreatedListener

Drawer

val drawerDemo = Drawer.newInstance(R.layout.demo_drawer_content)
drawerDemo.show(supportFragmentManager, null)

DrawerDialog

val drawerDialogDemo = DrawerDialog(this)
drawerDialogDemo?.setContentView(R.layout.demo_drawer_content)
drawerDialogDemo?.show()