View entire content of ScrollView in Eclipse's

2020-03-01 06:55发布

I'm using Eclipse Helios 3.6.2 for Android development and whenever I design a layout in the graphical layout mode (not the XML layout), I can't see the entire content of a ScrollView in the graphical layout.

Specifically, when I'm using a ScrollView and the height of the ScrollView exceeds the height of the content view area (i.e., the phone screen visible in the graphical layout mode), I am not able to see the items that I have at the bottom of the screen.

In Eclipse Helios 3.6.1 there was an option called "expand to fit"; whenever I used to click on it, the phone screen increased in size to encompass all the elements that I had added. How do i achieve the same thing in 3.6.2?

Graphical layout marking where I want to see the full view

标签: android
8条回答
SAY GOODBYE
2楼-- · 2020-03-01 07:22

There was a button that allow to remove the clipping generated in a scroll view and show all the views that you have inside it.

In later sdk versions the button is removed, and the view mode is triggered if the scroll view is the root element of the view, so my solution when this doesn't happen (because you have a relative layout with some buttons over the view for example) is extracting the scrollview to it's own view, and including it in the original layout with an include tag.

查看更多
放我归山
3楼-- · 2020-03-01 07:26

My quick fix.

In the upper right corner of the graphic layout window you will see a drop down menu that shows what minimum version of android you are creating for. Make sure you have it set to at least android 2.1. I had an app at 1.6 and i had the same issue you have. swapped minimum build platform to 2.1 and it was magic.

Hope this helps.

查看更多
登录 后发表回答