Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maxWidth option #13

Closed
gnuhel opened this issue Nov 30, 2014 · 8 comments
Closed

maxWidth option #13

gnuhel opened this issue Nov 30, 2014 · 8 comments

Comments

@gnuhel
Copy link

gnuhel commented Nov 30, 2014

Hi,

could you add an option to set the maxWidth of the BottomSheet.
Right now, on landscape mode it fill up the whole screen. I would like it to be more narrow (just like the menu options)

thanks

@gnuhel
Copy link
Author

gnuhel commented Nov 30, 2014

@soarcn I think changing MATCH_PARENT to WRAP_CONTENT is enough

@soarcn
Copy link
Owner

soarcn commented Dec 1, 2014

@gnuhel there is no difference even I set match parent to wrap_content, it is a gridview.
I am developing a feature to support initial capacity of bottomsheet, and could resolve the problem you mentioned.

@soarcn
Copy link
Owner

soarcn commented Dec 1, 2014

sorry I got you wrong...
BottomSheet is targeting to align google's offical guideline which will fill up the whole screen

But I could open an attribute to allow you guys to customize the container

@gnuhel
Copy link
Author

gnuhel commented Dec 1, 2014

@soarcn That would be great.

I meant these lines
https://github.com/soarcn/BottomSheet/blob/master/library/src/main/java/com/cocosw/bottomsheet/BottomSheet.java#L370
https://github.com/soarcn/BottomSheet/blob/master/library/src/main/java/com/cocosw/bottomsheet/BottomSheet.java#L382

Changing it from MATCH_PARENT to WRAP_CONTENT make it not filling up the whole screen, especially on tablet and landscape view

@soarcn
Copy link
Owner

soarcn commented Dec 1, 2014

Yes, but as it is a adapterview, I doubt it would work as you expect. anyway, I will help to figure it out.

@gnuhel
Copy link
Author

gnuhel commented Dec 1, 2014

i tried it and it works.
Probably I also change bottom_sheet_dialog.xml width to wrap_content
https://github.com/soarcn/BottomSheet/blob/master/library/src/main/res/layout/bottom_sheet_dialog.xml#L5

@soarcn soarcn removed the wontfix label Dec 2, 2014
soarcn added a commit that referenced this issue Dec 28, 2014
@soarcn
Copy link
Owner

soarcn commented Dec 28, 2014

@gnuhel You can now set wrap_content in your bottomsheet style.

@soarcn soarcn closed this as completed Dec 28, 2014
@noinnion
Copy link

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants