We can also use this method on click of a View (Button or any other view). This method is same as simple open() method but the only difference is we use this method when we need to open the drawer with an animation.īelow we open the drawer with an animation. animateOpen(): This method is used to opens the drawer with an animation. SimpleSlidingDrawer.close() // close the Sliding Drawerģ. SlidingDrawer simpleSlidingDrawer =(SlidingDrawer)findViewById(R.id.simpleSlidingDrawer) // initiate the SlidingDrawer We can also use this method on click of a View(Button or any other view). Sometime we close the drawer on View click ( Button, TextView etc), so for that we need to use this function.īelow we show how to use the close method of Sliding Drawer. close(): This method is used to close the drawer immediately. SimpleSlidingDrawer.open() // open the Sliding DrawerĢ. SlidingDrawer simpleSlidingDrawer =(SlidingDrawer) findViewById(R.id.simpleSlidingDrawer) // initiate the SlidingDrawer We can also use this method on click of a View( Button or any other view). Sometime we open the drawer on View click ( Button, TextView etc), so for that functionality we need to use this function.īelow we show how to use the open method of Sliding Drawer. open(): This method is used to opens the drawer immediately. Let’s we discuss some important methods of SliderLayout that may be called in order to manage the SliderDrawer.ġ. Inside an XML ( layout ), Sliding Drawer must define the id of the handle and of the content.The size of the Sliding Drawer defines how much space the content will occupy once slide out, so Sliding Drawer should usually use match_parent for both its dimensions.Sliding Drawer should be used as an overlay inside layouts means Sliding Drawer should only be used inside of a Relative Layout or a Frame Layout for instance.
0 Comments
Leave a Reply. |