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?
Use an included layout for the scrollview.
Move the entire scrollview layout in a separated file (ie: my_scrollview.xml).
The layout editor will then display the entire scrollview.
In the main layout use in place of the scrollview something like:
If use Relative layout, you can use layout_marginTop negative, like that:
Increase the layout_marginTop to move scrollview.
Just click on the
Config
window of theGraphical Layout
and click on the preview for all screen sizes and u will be able to see your scrollUse the
android:scrollY
in theScrollView
child and remove it before publishing.There's no way to scroll the content inside the Android Layout Editor. What you can do, though, is create a new device simulation with a huge height, so you can see what is hidden in the ScrollView.
To do so, go to the dropdown menu below "Editing config" ang choose "Custom..." (top-left corner of the Android Layout Editor). Select one of your preferred resolutions (mine is 3.7in WVGA) and hit "Copy". The copied resolution will appear in the "Custom" group in the bottom of the list.
Choose your new configuration and hit "Edit...". In there, you can select the "Screen Dimension" property and change the value. I created a resolution 2000x480 (portrait). This way, I can see the whole content inside the ScrollView.
Hope it helps.
The drop-down on the left (under the text "Editing config: ...") allows you to change the simulated screen size in the graphical layout. Perhaps that is what you are looking for.