JakeWharton/u2020

Debug Drawer GridLayout Overflow

cdraeger opened this issue · 2 comments

I just ran into the problem that my debug drawer layout was too wide, the value column was overflowing.

The fix is simple though: for all Views in the value column the width needs to be set to 0dp and the layout-gravity needs an additional fill_horizontal.

So e.g.

<Spinner
  android:id="@+id/debug_network_delay"
  android:layout_gravity="start|end|center_vertical" />

becomes

<Spinner
  android:id="@+id/debug_network_delay"
  android:layout_width="0dip"
  android:layout_gravity="fill_horizontal|start|end|center_vertical" />

See also this link: http://daniel-codes.blogspot.de/2012/01/gridlayout-view-clipping-issues.html

Cool. We had this happen internally and just ended up switching to TableLayout.

Would you be able to send a pull request for this?

Sure, I can do that. I'll get to it as soon as I can, probably tomorrow.