Scrolling a dynamically filled AbsoluteLayout.

by rocrail » Fri, 23 Apr 2010 08:03:42 GMT


Sponsored Links
 Hi,

I'm searching for a few days now but I cannot find a scrolling
solution for the following layout:

<ScrollView xmlns:android=" http://schemas.android.com/apk/res/ 
android"
  android:id="@+id/levelScrollView"
  android:background="@drawable/solid_white"
  android:layout_width="fill_parent"
android:layout_height="fill_parent" >
  <LinearLayout android:layout_width="1024px"
android:layout_height="1024px">
  <AbsoluteLayout android:layout_width="1024px" android:id="@+id/
levelView"
    android:background="@drawable/solid_white"
android:layout_height="1024px" android:minHeight="1024px"
android:minWidth="1024px">
  </AbsoluteLayout>
  </LinearLayout>
</ScrollView>

The 1024px are set to test but should be dynamically set to the needed
width and height during runtime.
Vertically scrolling works, but I do not get it horizontally scrolling
too.
See the screen shot of the 'Layout level' view in action:
 http://wiki.rocrail.net/doku.php?id=androc-intro-en #qvga_gallery

Any advice? Or do I have a design problem in this layout?

Best regards,
Rob Versluis.
 http://www.rocrail.net 

--