Layoutproblem med listView

Diskussion i 'Frågor, support och diskussion' startad av Sigma78, 21 feb 2011.

  1. Sigma78

    Sigma78 Teen Droid Medlem

    Blev medlem:
    27 jul 2010
    Inlägg:
    360
    Mottagna gillanden:
    6

    MINA ENHETER

    Hej,

    Jag har en Listview för att visa huvudmenyn i min app, och längst ner vill jag visa en liten copyright-text. När min Listview blir så stor att man måste scrolls döljs copyright-texten helt och hållet. Hur ska jag göra för att undvika det?

    Det spelar ingen roll om den ligger statiskt längst ner eller dyker upp under det sista objektet i listan.

    Min layoutfil ser ut så här:
    HTML:
    <?xml version="1.0" encoding="utf-8"?>
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/MainLayout"
     android:layout_width="fill_parent"
     android:layout_height="fill_parent"
     android:background="@color/background">
    <ImageView android:layout_width="fill_parent"
      android:id="@+id/ImageView"
      android:layout_height="wrap_content"
      android:src="@drawable/gasasteget_logo"
      android:background="@color/background"
      android:paddingBottom="20dp"
      android:paddingTop="20dp"
      />
    
    <TextView android:id="@+id/PageTitle"
      android:layout_width="fill_parent"   
      android:layout_height="wrap_content"
      android:textSize="25dp"
      android:textColor="#FF000000"
      android:gravity="center_horizontal"
      android:layout_below="@id/ImageView"
      android:visibility="gone"
      android:background="@color/background"
    />
      
    <TextView android:id="@+id/ExtraBorder"
      android:layout_width="fill_parent"   
      android:layout_height="wrap_content"
      android:textSize="0.1px"
      android:textColor="#FF000000"
      android:gravity="center_horizontal"
      android:background="#000000"
      android:layout_below="@id/PageTitle"
    />
    
     <ListView android:id="@+id/ListView01"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content" 
     android:cacheColorHint="#00000000"
     android:background="@color/background"
     android:layout_below="@id/ExtraBorder"
     />
     <TextView android:id="@+id/ExtraBorder2"
      android:layout_width="fill_parent"   
      android:layout_height="wrap_content"
      android:textSize="0.1px"
      android:textColor="#FF000000"
      android:gravity="center_horizontal"
      android:background="#000000"
      android:layout_below="@id/ListView01"
    />
     
     <TextView android:id="@+id/Credits"
      android:layout_width="fill_parent"   
      android:layout_height="wrap_content"
      android:textColor="#FF000000"
      android:gravity="center_horizontal"
      android:text="v1.2 (c) Henrik Larsson, 2011"
      android:background="@color/background"
      android:layout_below="@id/ExtraBorder2"
      android:textStyle="italic"
      android:minHeight="20dp"
      android:layout_weight="2"
    />
     
     </RelativeLayout>
     
  2. foobar17

    foobar17 Kid Droid Medlem

    Blev medlem:
    12 jun 2009
    Inlägg:
    56
    Mottagna gillanden:
    11

    MINA ENHETER

    Placera din credits textview i botten med alignParentBottom=true, sedan placerar du din lista mellan widgent:en ovan listan och credits textview, mha below=PageTitle resp above=Credits. (OBS, förenklade XML attribut)
     
    Sigma78 gillar detta.
  3. Sigma78

    Sigma78 Teen Droid Medlem

    Blev medlem:
    27 jul 2010
    Inlägg:
    360
    Mottagna gillanden:
    6

    MINA ENHETER

    Tackar! Jag ska prova det direkt imorgon bitti!

    Edit: Fungerade kanon!

    Sent from my GT-I9000 using Tapatalk
     
    Last edited: 22 feb 2011