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

Making the layout take up the entire length of the screen #3

Closed
danwguy opened this issue May 21, 2018 · 2 comments
Closed

Making the layout take up the entire length of the screen #3

danwguy opened this issue May 21, 2018 · 2 comments

Comments

@danwguy
Copy link

danwguy commented May 21, 2018

I have a Tabbed layout, and on the second tab the design people put another set of tabs, there's only 2 tabs, and I thought it was a bad idea to put tabs inside tabs. So I decided to make the second "tab" section 2 toggle buttons, since it just changes the values in a chart on the screen. The problem is, when using this layout the toggle buttons are very small and don't stretch to fill the screen. The way I am picturing it is, if you had a LinearLayout with layout_width set to match_parent, then weightSum set to 2, then each of the toggles would have layout_weight = 1 and they would stretch to fill in the width of the screen. The way I have it set right now in my layout is a LinearLayout with layout_width to "match_parent" and height to "wrap_content", then in my ToggleButtonLayout I have layout_width to "match_parent", but they are still just 2 small buttons on the left side of the screen, not stretching to fill the entire width. Is there a way to do this?

@Jawnnypoo
Copy link
Contributor

Hey there,

Did you try this with app:toggleMode="even" in your XML?

@Jawnnypoo
Copy link
Contributor

I believe this should work for your case. Let us know if it does not!

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

No branches or pull requests

2 participants