Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
KotakeTetsuya
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 14
Join Date: Mar 2011
Default [Q] ListView doesn't use fill_parent

I have made a sidebar and want to display little screenshots in the sidebar. The ListView contains a LinearLayout with an ImageView. The ListView should take the full screen height, but it is only as big as one item. How must I change the xml to get the ListView using full screenheight?

Thanks in advance

Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/firstlin"
	android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    xmlns:android="http://schemas.android.com/apk/res/android">
    
    <HorizontalScrollView android:layout_width="wrap_content"
  		android:layout_height="fill_parent" 
  		android:scrollbars="none">
  		
 		<LinearLayout android:id="@+id/LinearLayout03"
			android:layout_width="fill_parent"
			android:orientation="horizontal"
			android:layout_height="fill_parent">
		
				<ScrollView android:id="@+id/ScrollView01"
					android:padding="10dip"
	        		android:layout_width="wrap_content" 
	        		android:layout_height="fill_parent"
	        		android:background="#D8D8D8"
	        		android:scrollbars="none">
	        			
						<LinearLayout android:id="@+id/LinearLayout09"
							android:layout_width="wrap_content"
							android:orientation="vertical"
							android:layout_height="fill_parent">
							
							<ListView android:id="@id/android:list" 
							    android:layout_width="fill_parent"
								android:layout_height="fill_parent"
							/>
							
						</LinearLayout>
						
				</ScrollView>
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
 
Lakers16
Old
#2  
Member
Thanks Meter 13
Posts: 82
Join Date: Nov 2010

 
DONATE TO ME
I dont understand why you have a scrollview. A listview scrolls. You have 2 moving parts
 
KotakeTetsuya
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 14
Join Date: Mar 2011
Thank you

I didn't no that a listview scrolls - i removed the scrollview, now everythink work.

Kotake
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...