Patel Vicky
Patel Vicky

Reputation: 766

how to set slider in both side android

I am trying to make sliding drawer menu like the one in the YouTube app. I navigated many questions like this amazing one here. and found a lot of libraries but all of them slide from left to right or from right to left in different one. I want to make it slide from both sides, left to right and right to left via two buttons in the top bar.

Upvotes: 2

Views: 272

Answers (3)

Nathan Walters
Nathan Walters

Reputation: 4136

You can use the standard DrawerLayout from the support library. As it says in the documentation, you can control the placement of the drawers with the layout_gravity attribute. From the documentation:

To use a DrawerLayout, position your primary content view as the first child with a width and height of match_parent. Add drawers as child views after the main content view and set the layout_gravity appropriately. Drawers commonly use match_parent for height with a fixed width.

Upvotes: 0

harshvardhan
harshvardhan

Reputation: 805

Use Yahoo Rangeseekbar

The package is

com.yahoo.mobile.client.android.util.rangeseekbar

It will let you slide both the sides and you can choose if you want to display the values on the top of the slider min and max ends.

Upvotes: 0

Rajesh
Rajesh

Reputation: 622

You can look at github.com/Ali-Rezaei/SlidingDrawer, which mekes it possible for you to slide from any side.

Upvotes: 1

Related Questions