You should be able to achieve this with android:layout_height="0px"
android:layout_weight="1" on the scroll view (with it in a vertical linear
layout).

On Sun, May 3, 2009 at 6:41 AM, vellanova <[email protected]> wrote:

>
> Pulling my hair out on this one. I want a dialog that contains a
> ScrollView with an embedded TextView that will contain what could be a
> couple of pages of text. Below the ScrollView I want a close button.
> Everything I try that doesn't involve directly setting the height of
> the ScrollView results in the ScrollView filling the dialog and the
> button being invisible because it has been pushed off the bottom. I've
> tried about every combination I can think of for layout_height and
> layout_weight of both the ScrollView and the Button but always get the
> same result.
>
> Anyone know if there is any way to get this to work short of forcing
> the height?
>
> -Shon
>
> <?xml version="1.0" encoding="utf-8"?>
> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> android"
>        android:id="@+id/content_layout"
>        android:orientation="vertical" android:layout_width="fill_parent"
>        android:layout_height="fill_parent">
>        <ScrollView android:layout_width="fill_parent"
>                android:layout_height="fill_parent">
>                <LinearLayout android:id="@+id/about_container"
>                        android:layout_width="fill_parent"
> android:layout_height="fill_parent"
>                        android:paddingLeft="5dip"
> android:paddingRight="5dip"
>                        android:orientation="vertical">
>                        <TextView android:layout_width="fill_parent"
>                                android:layout_height="wrap_content"
> android:id="@+id/
> license_text"
>                                android:layout_margin="5sp" />
>                </LinearLayout>
>        </ScrollView>
>        <Button android:id="@+id/close_about_btn" android:text="@string/
> close"
>                android:layout_width="fill_parent"
> android:layout_height="fill_parent"
>                android:layout_weight="1.0"
>                android:padding="5sp" />
> </LinearLayout>
>
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~
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