niko001 wrote: > Hi, > > I am using a ScrollView as a child of an AbsoluteLayout to display a > list of items inside this AbsoluteLayout. Because the ScrollView is > 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 > ScrollView or 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...> > > <ScrollView android: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 like ScrollView and 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 your ScrollView as 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 -~----------~----~----~----~------~----~------~--~---

