How to get the right slide to work with a button in android

Hi I found a very nice lib here that helps with sliding implementation in Android. The problem is, using this lib, I can achieve switching one side at a time to the left or right.

I want to implement switching on both sides. If I click on the left side, I want the left view to appear, and a similar right view should appear if I click on the right button.

I also got one thread from the same author i, e here . In this case, we have the ability to indicate when switching the weather to the left or right.

We need to combine them and use them. but i am confused how which function to choose even if both have the same names and i have to overwrite or not ?. really confused what to do. any help?

+3


source to share


1 answer


The second version is an older version of the library, but you can specify which sliding mode you want in the current version, for example:

 SlidingMenu menu = new SlidingMenu(this);
 menu.setMode(SlidingMenu.LEFT);

      



This will set it to the left sliding menu, however you can also specify SlidingMenu.RIGHT

for the right or SlidingMenu.LEFT_RIGHT

both.

So just use the current version .

+4


source







All Articles