android - How to generate Listview with button? -


i want implement listview 3 button below. xml given code below problem position of button. in first time used linear in time action of buttons inversed. ought use relative layout

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:orientation="vertical"     android:padding="3dp" >      <relativelayout         android:layout_width="fill_parent"         android:layout_height="fill_parent"         android:orientation="vertical"         android:padding="3dp" >          <listview             android:id="@+id/list"             android:layout_width="fill_parent"             android:layout_height="fill_parent"             android:layout_margintop="5dp"             android:layout_weight="1" />          <relativelayout             android:layout_width="fill_parent"             android:layout_height="wrap_content"             android:layout_alignparentbottom="true"             android:layout_below="@+id/listview"             android:layout_margin="0dp"             android:orientation="horizontal"             android:padding="0dp" >              <button                 android:id="@+id/retour"                 android:layout_width="fill_parent"                 android:layout_height="wrap_content"                 android:layout_margin="0dp"                 android:layout_weight="1"                 android:padding="0dp"                 android:text="@string/cancel" />              <button                 android:id="@+id/actualise"                 android:layout_width="fill_parent"                 android:layout_height="wrap_content"                 android:layout_margin="0dp"                 android:layout_weight="1"                 android:gravity="center|center_vertical"                 android:padding="0dp"                 android:text="actualiser la liste" />              <button                 android:id="@+id/testbutton"                 android:layout_width="fill_parent"                 android:layout_height="wrap_content"                 android:layout_margin="0dp"                 android:layout_weight="1"                 android:padding="0dp"                 android:text="@string/selection" />         </relativelayout>     </relativelayout>  </linearlayout> 

check link, used button using example http://think4dev.wordpress.com/2012/09/16/button-clicks-in-a-listview-row-in-android/


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -