Note that there are some explanatory texts on larger screens.

plurals
  1. PODisplay object from base adapter android
    primarykey
    data
    text
    <p>I want to display and run a button below a list which is loaded using the tenantlistadapter class. My problem is that i dont know where to put the object.</p> <p>my class is as follows</p> <pre><code>public class TenantListAdapter extends BaseAdapter { private TenantList tenantList; private Context _context; private int selectedTenantPosition; static int selectedid; Button boutton_facebook; Intent browserIntent; public TenantListAdapter(Context context, TenantList array) { this.tenantList = array; this._context = context; } ... @Override public View getView(int position, View convertView, ViewGroup parent) { .. } } </code></pre> <p>the view method display list view data only but i want the button to appear below the list. So putting the button inside the view is unsuitable because it displays only list data. is there another method to call the button outside the class ?</p> <p>This is my xml file. i want the facebook button to appear below the list view</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#ffffff" android:orientation="vertical" &gt; &lt;RelativeLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="0.3" &gt; &lt;ImageView android:id="@+id/nav_bar" android:layout_width="fill_parent" android:layout_height="wrap_content" android:scaleType="fitXY" /&gt; &lt;Button android:id="@+id/back_button" android:layout_width="100dp" android:layout_height="60dp" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:background="@android:color/transparent"/&gt; &lt;/RelativeLayout&gt; &lt;LinearLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="0.7" android:background="@drawable/home_background" &gt; &lt;ListView android:id="@id/android:list" android:layout_width="fill_parent" android:layout_height="355dp" android:layout_margin="10dp" android:cacheColorHint="#00000000" /&gt; &lt;Button android:id="@+id/boutton_facebook" android:layout_width="fill_parent" android:layout_height="match_parent" android:drawableLeft="@drawable/f_logo" android:gravity="center_vertical|center_horizontal" android:text="@string/event" android:textSize="@dimen/facebook_button_text_size" android:textStyle="bold" android:typeface="serif" /&gt; &lt;/LinearLayout&gt; &lt;/LinearLayout&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload