Works great, thank you very much! I though the layout_height parameter
only accepted "wrap_content" or "fill_content" as values (not actual
units), which was...stupid of me :-)!

I will change the AbsoluteLayout to a RelativeLayout.

Thanks again,
Niko



On Jul 26, 4:08 pm, Mark Murphy <[email protected]> wrote:
> niko001 wrote:
> > Hi,
>
> > I am using aScrollViewas a child of an AbsoluteLayout to display a
> > list of items inside this AbsoluteLayout. Because theScrollViewis
> > embedded in the AbsoluteLayout's design, I want to restrict it's size
> > to fit the assigned area. Is there any way to set the height of the
> >ScrollViewor of the RelativeLayout that is the child of my
> >ScrollView?
>
> > My layout.xml (with just the important tags):
>
> > <AbsoluteLayout android:layout_width="fill_parent"
> > android:layout_height="fill_parent" />
> > <...some TextViews...>
>
> >      <ScrollViewandroid:layout_width="wrap_content"
> > android:layout_height="wrap_content">
> >         <RelativeLayout android:layout_width="wrap_content"
> > android:layout_height="wrap_content">
> >             <...some TextViews that I want to be able to scroll, all
> > with wrap_content...>
> >         </RelativeLayout>
> >      </ScrollView>
>
> > <...again, some TextViews in the main layout...>
> > </AbsoluteLayout>
>
> > To make it clearer, I have uploaded two images of what I am trying to
> > do:
> >http://drop.io/v8qobow/asset/current-jpg
> >http://drop.io/v8qobow/asset/goal-jpg
>
> 1. android:layout_height="wrap_content" is meaningless for scrollable
> things likeScrollViewand ListView. Try using a concrete height.
>
> 2. Why are you using AbsoluteLayout in this case? The class is
> deprecated, and from those JPEGs, it would not seem as if AbsoluteLayout
> is, er, absolutely required. For example, if you used RelativeLayout,
> you could specify yourScrollViewas coming between some of the other
> items (e.g., above and below those TextViews), and therefore you could
> get a concrete height that way.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Looking for Android opportunities?http://wiki.andmob.org/hado
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to