Hi,

Now the followup question comes, when the list is smaller than the
screen size, the "Footer" appear after the last item in the list.
How can I make the "Footer" always stay at the bottom of the screen,
independently of number of list items?

Header
Item1
Item2
...
no items
...
...
...
Footer

Help greatly appreciated,
Regards Jonas.

On Aug 8, 11:47 am, Jonas <jonas.hey...@gmail.com> wrote:
> Hi again,
>
> Im sorry it did work, first time off there was some problem
> but after refresh and redeployment it did work perfect.
> Thanks Mark!
>
> Regards Jonas.
>
> On Aug 8, 11:18 am, Jonas <jonas.hey...@gmail.com> wrote:
>
> > Hi,
>
> > That did not work, my GUI looks like this now:
>
> > Header:
> > Footer:
>
> > With no visible listview...
>
> > Regards Jonas.
>
> > On Aug 8, 3:21 am, Mark Murphy <mmur...@commonsware.com> wrote:
>
> > > Jonaswrote:
> > > > Hi.
>
> > > > The foooter for this list view goes out of scope. The header is fixed
> > > > but I like the footer also to
> > > > be fixed, thus scrolling the list between the header and footer. Cant
> > > > get this to work below is my xml:
>
> > > > <?xml version="1.0" encoding="utf-8"?>
> > > > <LinearLayout xmlns:android="http://schemas.android.com/apk/res/
> > > > android"
> > > >   android:orientation="vertical"
> > > >    android:layout_width="fill_parent"
> > > >    android:layout_height="wrap_content">
>
> > > >    <TextView android:id="@+id/view"
> > > >                                                    
> > > > android:layout_width="wrap_content"
> > > >                                                    
> > > > android:layout_height="wrap_content"
> > > >                    android:text="Header:"/>
>
> > > >   <LinearLayout
> > > >            android:orientation="vertical"
> > > >            android:layout_width="fill_parent"
> > > >            android:layout_height="wrap_content">
>
> > > >            <ListView android:id="@+id/android:list"
> > > >                                                    
> > > > android:layout_width="fill_parent"
> > > >                                                    
> > > > android:layout_height="wrap_content"/>
>
> > > >            <TextView android:id="@+id/android:empty"
> > > >                                                    
> > > > android:layout_width="fill_parent"
> > > >                                                    
> > > > android:layout_height="wrap_content"
> > > >                                              android:textSize="20sp"
> > > >                                                    android:text="No 
> > > > data!"/>
>
> > > >   </LinearLayout>
>
> > > >            <TextView android:id="@+id/summary"
> > > >                                                    
> > > > android:layout_width="wrap_content"
> > > >                                                    
> > > > android:layout_height="wrap_content"
> > > >                    android:text="Footer:"/>
>
> > > > </LinearLayout>
>
> > > Set your middle LinearLayout's layout_height to 0px and layout_weight to
> > > 1. That will cause it to take up all extra space that your header and
> > > footer do not use.
>
> > > --
> > > Mark Murphy (a Commons 
> > > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> > > _Beginning Android_ from Apress Now Available!
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to