0

When I start my applications, almost slidingdrawer is closed, but I want to make opened slidingdrawer from the beginning.

How can I do this?

I've tried to use offset or dispatchDraw, but I didn't make it.

Michael Yaworski
  • 13,410
  • 19
  • 69
  • 97
Barb_ggul
  • 79
  • 1
  • 2
  • 4

2 Answers2

1

Use slide.open in onCreate();

slide.open(); 
slide.setOnDrawerScrollListener(this);

@Override
public void onScrollStarted() {
    if (slide.isOpened()) {
    }
    else {
        slide.open(); 
    }
}
henry4343
  • 3,871
  • 5
  • 22
  • 30
0

Use SlidingDrawer.open() at the end of onCreate.

This is not advised, keeping the menu open everytime will reduce interest in usage of the app.

use SharedPreferences to store the number times that uses has used & show the user only for first few times.

    if (mStorage.getAppOpenedTimes() < 2)
    {
        SlidingDrawer.open();
    }

But, you can ignore all the above if keeping the menu opened is necessary in your app.

VenomVendor
  • 15,064
  • 13
  • 65
  • 96