Alignment Issue (Button) and ListView Problem

Put your problem here if it does not fit any of the other categories.

Alignment Issue (Button) and ListView Problem

Postby zeeshan » Mon Mar 10, 2008 11:07 am

Hello Can any body please help me
when i run this layout on android it does not show me buttons

it was showing me buttons when the listview items were there when it become more than three then it do not show me buttons

and also i want to show one button to left and one to right please help me out

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <LinearLayout  xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.    android:orientation="vertical"
  6.  
  7.    android:layout_width="fill_parent"
  8.  
  9.    android:layout_height="fill_parent"
  10.  
  11.    android:padding="10dip">
  12.  
  13.  
  14.  
  15.    <ImageView  
  16.  
  17.    android:layout_width="fill_parent"
  18.  
  19.    android:layout_height="wrap_content"    
  20.  
  21.    android:orientation="horizontal"
  22.  
  23.    android:src="@drawable/logo"
  24.  
  25.         android:layout_gravity="center_vertical"/>
  26.  
  27.  
  28.  
  29. <LinearLayout
  30.  
  31.                  android:layout_height="wrap_content"
  32.  
  33.                  android:layout_width="fill_parent"
  34.  
  35.                  android:orientation="vertical">
  36.  
  37.  
  38.  
  39.  
  40.  
  41.     <ListView android:id="@+id/android:list"
  42.  
  43.        android:layout_width="fill_parent"
  44.  
  45.         android:layout_height="wrap_content"/>
  46.  
  47.     </LinearLayout>
  48.  
  49.  
  50.  
  51.  
  52.  
  53. <LinearLayout
  54.  
  55.                  android:layout_height="wrap_content"
  56.  
  57.                  android:layout_width="fill_parent"
  58.  
  59.                  android:orientation="horizontal">
  60.  
  61.  
  62.  
  63.                  
  64.  
  65.     <Button android:id="@+id/select"
  66.  
  67.            android:layout_height="wrap_content"
  68.  
  69.            android:layout_width="wrap_content"
  70.  
  71.            android:text="@string/select"
  72.  
  73.            android:gravity="left"/>
  74.  
  75.  
  76.  
  77.     <Button android:id="@+id/exit"
  78.  
  79.            android:layout_height="wrap_content"
  80.  
  81.            android:layout_width="wrap_content"
  82.  
  83.            android:text="@string/exit"
  84.  
  85.            android:gravity="right"/>
  86.  
  87.     </LinearLayout>
  88.  
  89.          
  90.  
  91.  
  92.  
  93.  
  94.  
  95. </LinearLayout>
Parsed in 0.005 seconds, using GeSHi 1.0.8.4
zeeshan
Experienced Developer
Experienced Developer
 
Posts: 68
Joined: Mon Mar 03, 2008 6:10 am

Top

Here the main problem is i think

Postby zeeshan » Mon Mar 10, 2008 1:30 pm

Whenever size of listview item increaes it does not show the button in the bottom
i dont understand what the problem is that i think ...it shows button when listview size is three and does not show buttons when listview size is greater than 3

please help me out

Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  4.  
  5.         android:orientation="vertical" android:layout_width="fill_parent"
  6.  
  7.         android:layout_height="fill_parent"
  8.  
  9.         android:scrollbarSize = "14.5sp">
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.         <ImageView android:layout_width="fill_parent"
  20.  
  21.                 android:layout_height="wrap_content" android:orientation="horizontal"
  22.  
  23.                 android:src="@drawable/logo" android:layout_gravity="center_vertical" />
  24.  
  25.  
  26.  
  27.  
  28.  
  29.         <ListView android:id="@+id/android:list"
  30.  
  31.                 android:scrollbars = "vertical"
  32.  
  33.                 android:layout_width="fill_parent"
  34.  
  35.                 android:layout_height="wrap_content"
  36.  
  37.                
  38.  
  39.                 />
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.         <RelativeLayout android:id="@+id/widget30"
  48.  
  49.                 android:layout_width="fill_parent" android:layout_height="fill_parent"
  50.  
  51.                 xmlns:android="http://schemas.android.com/apk/res/android">
  52.  
  53.                 <Button android:id="@+id/select"
  54.  
  55.                         android:layout_width="wrap_content"
  56.  
  57.                         android:layout_height="wrap_content" android:text="select"
  58.  
  59.                         android:layout_alignParentTop="true"
  60.  
  61.                         android:layout_alignParentLeft="true">
  62.  
  63.                 </Button>
  64.  
  65.                 <Button android:id="@+id/exit"
  66.  
  67.                         android:layout_width="wrap_content"
  68.  
  69.                         android:layout_height="wrap_content" android:text="exit"
  70.  
  71.                         android:layout_alignParentTop="true"
  72.  
  73.                         android:layout_alignParentRight="true">
  74.  
  75.                 </Button>
  76.  
  77.         </RelativeLayout>
  78.  
  79.  
  80.  
  81. </LinearLayout>
Parsed in 0.005 seconds, using GeSHi 1.0.8.4
zeeshan
Experienced Developer
Experienced Developer
 
Posts: 68
Joined: Mon Mar 03, 2008 6:10 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests