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 

--



Other Threads

1. Align one image after another

Hi, I am trying to form a page with images background like html,

the "frame_bottomleft" managed to align to the bottom and left of the
layout, but I would like the "frame_lsk" to align on the right of the
"frame_bottomleft" without overlapping.

How would I do that?


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/
android"
        android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
    <ImageView
        android:id="@+id/frame_bottomleft"
        android:layout_alignParentLeft="true"
        android:layout_alignParentBottom="true"
        android:layout_width="5px"
        android:layout_height="36px"
        android:background="@drawable/global_frame_bottomleft"
    />
    <ImageView
        android:id="@+id/frame_lsk"
        android:layout_alignLeft="@id/frame_bottomleft"
        android:layout_alignParentBottom="true"
        android:layout_width="53px"
        android:layout_height="29px"
        android:background="@drawable/global_frame_bottomleft2"
    />
</RelativeLayout>

--~--~---------~--~----~------------~-------~--~----~

2. Is Bitmap.compress thread safe?

Because the Bitmap.compress(Bitmap.CompressFormat format, int quality,
OutputStream stream) function can sometimes take a long time I am
calling it in a separate thread with low priority. During this time I
am drawing the same bitmap in the UI thread using Canvas.drawBitmap
(Bitmap bitmap, float left, float top, Paint paint) at 30fps.

Although the bitmap is mutable I am not writing to the bitmap during
this period. It works fine but I want to make sure that it is safe to
do this.

Thanks
--~--~---------~--~----~------------~-------~--~----~

3. How to debug android opencore by gdb?

4. intent-filter for addContact and editContact ?

5. ContentProvider/SQLiteDatabase.delete() Docs

6. ALSA userspace library

7. If I find a bug in Android OS