Reputation: 365
In my graphical layout, it cuts off at the end of the screen, even if I have a scrollview set up. Is there a way to expand the graphical layout so that I can see the entire scrollview and not just limited to the screen size?
xml Code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layoutChampions"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<ScrollView
android:id="@+id/scrollView1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
Upvotes: 2
Views: 1445
Reputation: 4707
Your ScrollView
is cropped by RelativeLayout
's height, even though it's set to wrap_layout
. Depends on the layout requirement, you probably don't need a container for ScrollView
. If that's the case, remove layoutChampions
and set ScrollView
as the root. This will make the preview screen ignore the height limit, and let you see the full layout.
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
...
</LinearLayout>
</ScrollView>
If you need a container for your ScrollView
and some other View
s, you probably want to have larger (higher) preview screen. You can create custom device as the workaround.
As the custom device has been created, you can now select it on the preview screen. (Restart Eclipse if it doesn't appear).
Upvotes: 3
Reputation: 15798
Updated:
There's no way to Scroll ScrollView in Eclipse Graphical Layout. However you can do one of following things.
Create a Previewer with Large Screen and see your whole content.
Upvotes: 1