ListView overlapping bottom view

by Jose Gomez » Mon, 26 Apr 2010 02:56:15 GMT


Sponsored Links
 Hello all,

I have the following layout, which gives me a header, a list view and a
footer it looks good but when the listview's contents are greater than
wheere the bottom textview start its basically overlays the list on top of
it. I was the listview to not overlay on top of the footer Any help is
greatly appreaciated

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
xmlns:android=" http://schemas.android.com/apk/res/android" ;
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:src="@drawable/groshielogo"
</ImageView>
<TextView
android:id="@+id/lbl_goshopping_aisle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10px"
android:text="Aisle 1"
android:textSize="25sp"
android:textStyle="bold"
android:layout_gravity="center_horizontal"
</TextView>
<RelativeLayout
 android:layout_width="wrap_content"
 android:layout_height="wrap_content"
 android:layout_centerHorizontal="true">
<ListView
android:id="@+id/lst_goshoppingList"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
</ListView>
<TextView
android:id="@+id/lbl_goshopping_footer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10px"
android:text="Aisle 1"
android:textSize="25sp"
android:textStyle="bold"
android:layout_gravity="center_horizontal"
android:layout_alignParentBottom="true"

/>
</RelativeLayout>
</LinearLayout>



Sincerely
Jose C Gomez

 http://www.josecgomez.com 

--



ListView overlapping bottom view

by Andrey Mandychev » Fri, 28 May 2010 03:52:12 GMT


 


Hi,
I had the same problem but the solution was found in List7 example
from ApiDemos. Below is the XML snippet:

<LinearLayout xmlns:android=" http://schemas.android.com/apk/res/ 
android"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:paddingLeft="8dip"
        android:paddingRight="8dip">

        <ListView android:id="@android:id/list"
            android:layout_width="fill_parent"
            android:layout_height="0dip"
            android:layout_weight="1"
            android:drawSelectorOnTop="false"/>

    <TextView android:id="@+id/phone"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/blue"/>

</LinearLayout>

--


Sponsored Links


Other Threads

1. Using XMLBeans with 1.5 causes Dalvik errors

Hi everyone,
Here's the situation: I have a schema that I put through XMLBeans and
generated the java sources from it. I want to take those java files
and use them in my 1.5 app, but when I try and build the project, I
get this error:

Conversion to Dalvik format failed: Unable to execute dex: null.

I did some looking around and I found that this error comes from the
use of external sources that aren't built against android. The thing
is, the java files haven't been built yet. When the app is built, then
the java files are built.

A few things to note: Yes, I have put the required XMLBeans jars on
the classpath; The generated schema is somewhere in the area of 1400
java files (it's a huge schema); and normally when I try and build the
jar with all those jars in eclipse, eclipse runs out of memory. I did
up the memory in eclipse and things worked better, but I still got
that error. I have read elsewhere that XMLBeans doesn't really work on
1.5, so I'm not sure if that is the problem here, or if this is
something else.

If anyone has any input on this or has run into this before, it would
be greatly appreciated.

Thanks,
Robbie

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

2. findViewById return null

Hi,

When I tried to return my image button using findViewById in my View
class, it always return null. To resolve this, I use findViewById in
the Activity class to retrieve my image button and pass it to the View
class which is rather inefficient. Is there a way to retrieve my image
button using findViewById in my View class?

Regards,
Cg

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

3. media player that plays bbc radio (streaming)

4. How to adjust large image automatically in WebView

5. findViewById returns null MapView when following maps tutorial

6. Null reference for ImageView

7. accelerometer