ListView nimmt Tabbar den Platz weg :D

  • 0 Antworten
  • Letztes Antwortdatum
MetBo

MetBo

Erfahrenes Mitglied
4
Hallo,

ich habe das Problem, dass meine ListView den Platz meiner Tabbar wegnimmt.

Wenn die ListView leer ist, dann wird die Tabbar angezeigt, wenn die ListView gefüllt ist, dann tut sie so, als hätte sie den Wert "fill_parent" und füllt den gesamten Bildschirm.

Code:
<?xml version="1.0" encoding="utf-8"?>

<TabHost 
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:id="@+id/android:tabhost" 
	android:layout_width="fill_parent"
	android:layout_height="fill_parent" >

	<LinearLayout 
		android:orientation="vertical"
		android:layout_width="fill_parent" 
		android:layout_height="fill_parent" >
			 
	    <ListView 
	    	android:id="@+id/listArticles"		    		    	
	     	android:layout_height="wrap_content"
	     	android:layout_width="wrap_content"
	     	android:background="#fff"
	     	android:cacheColorHint="#fff" />

		<include layout="@layout/tabbar" />

		<TabWidget
			android:id="@+id/android:tabs"
			android:layout_width="fill_parent" 
			android:layout_height="wrap_content"
			android:layout_weight="0" 
			android:visibility="gone" />

	</LinearLayout>

</TabHost>

tabbar.xml
Code:
<?xml version="1.0" encoding="utf-8"?>

<LinearLayout
	xmlns:android="http://schemas.android.com/apk/res/android"
	android:layout_width="wrap_content" 
	android:layout_height="wrap_content">

	<RadioGroup 
		android:layout_width="fill_parent"
		android:layout_height="wrap_content" 
		android:orientation="horizontal"
		android:id="@+id/rgMenu" 
		android:startColor="#FF444444" 
		android:endColor="#FF000000"
		android:background="@drawable/unselected"
		android:angle="270">

		<RadioButton 
			android:id="@+id/radNews" 
			android:background="@drawable/button_radio"
			android:width="80dip" 
			android:height="70dip"
			android:visibility="invisible" />
					
		<RadioButton 
			android:id="@+id/radFavorites" 
			android:background="@drawable/button_radio"
			android:width="80dip" 
			android:height="70dip"
			android:visibility="invisible" />
			
		<RadioButton 
			android:id="@+id/radArchive" 
			android:background="@drawable/button_radio"
			android:width="80dip" 
			android:height="70dip"
			android:visibility="invisible" />
			
		<RadioButton 
			android:id="@+id/radSettings" 
			android:background="@drawable/button_radio"
			android:width="80dip" 
			android:height="70dip"
			android:visibility="invisible" />

	</RadioGroup>
	
</LinearLayout>

Weiß vielleicht jemand von euch, wie ich IMMER die Tabbar anzeigen lassen kann und die ListView den Rest des Bildschirms einnimmt?


Danke
 
Zurück
Oben Unten