jfeinstein10 / SlidingMenu

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!
Apache License 2.0
11.08k stars 5.05k forks source link

Sliding menu list width #704

Open SagarRaiyani opened 9 years ago

SagarRaiyani commented 9 years ago

Hello

I have integrate your menu example in our application but the menu list width not set in same in layout land & portrait so please give me suggestion for this issue..

Thanks,

easyfast2008 commented 9 years ago

If I get your problem correct, you can set two offset for every rotation and use them like this:

    int rotation = getBaseContext().getResources().getConfiguration().orientation;
    if (rotation == 2) {
        slidingMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset2);
    } else if (rotation == 1) {
        slidingMenu.setBehindOffsetRes(R.dimen.slidingmenu_offset);
    }
SagarRaiyani commented 9 years ago

thanks easyfast2008