title: how to show text above list ,i use ListActivity to show a custom list
body: <p>dear 
  how to show text above customise list when i extends listactivity in my class file..the code is given below..</p>
  
  <pre><code>public class ServerResponce extends ListActivity {
          private ArrayList&lt;listobj&gt; tobj = new ArrayList&lt;listobj&gt;();
           static String str1;
          PickUpLocation pickup=new PickUpLocation();
          String pickuplocid=  pickup.locationid;
          String des=planner.description;
           @Override
           public void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
        **//here not work force close**
                    //     ****setContentView(R.layout.list_item);
  
  **//                    TextView tv = (TextView)findViewById(R.id.text1);
  //                       tv.setText("i want to book a  cab for 4 hr/40km from sushant lok to delhi air port at" +
  //                          "4 pm today"
  //                           +"the cab should be 4 seater compact cab with carriage");
  //                            tv.setBackgroundColor(R.color.black);**    
  //        
  
  
           new MyTask().execute();
           }         
  
        private class MyTask extends AsyncTask&lt;Void, Void, Void&gt;
        {
                private ProgressDialog progressDialog;
                protected void onPreExecute() {
                        progressDialog = ProgressDialog.show(ServerResponce.this,
                                          "", "Loading. Please wait...", true);
                }
  
                protected void onProgressUpdate(Integer... integer){
                    TextView tv = null;
                  tv.setText("gjh");
                }
                @Override
                protected Void doInBackground(Void... arg0) {
                        try {
  
  
  
                            URL url = new URL("http://qrrency.com/mobile/j2me/cab/CabBookingStatus.php?requestid=666");
                            BufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));
                            int l=0;
                            int k=0;
                            StringBuffer buffer=new StringBuffer();
                            String str=" ";
                            while ((l=in.read())!=-1) 
                            {
                                  buffer.append((char)l);
                                  str=str+(char)l;
  
                            } 
  
                             in.close();
  //                                  
                                  try {
                              JSONObject json = new JSONObject(str);
                              JSONArray nameArray=json.getJSONArray("bookings");
                              JSONObject[] cabListing=new JSONObject[nameArray.length()];
                              for (int i = 0; i &lt; cabListing.length; i++) {
  
                                  //JSONObject jSONObject = cabListing[i];
                                   JSONObject jSONObject = nameArray.getJSONObject(i);
                                   listobj tweet = new listobj();
                                   JSONObject temp=jSONObject.getJSONObject("booking");
                                   tweet.cabid = temp.getString("cabbookingid");
                                   tweet.author =temp.getString("CabDriverName");
                                   tweet.content =temp.getString("price");
                                   tweet.cabrat=temp.getString("cabrating");
                                   tobj.add(tweet);
                              }
                              } catch (JSONException e) {
                                  // TODO Auto-generated catch block
                                  e.printStackTrace();
                              }
  
                          } catch (MalformedURLException e)
                          {
                          } catch (IOException e) 
                          {
  
                      }
  
  
  
  
                    return null;
                }
  
          @Override
          protected void onPostExecute(Void result) {
                  progressDialog.dismiss();
                  setListAdapter(new tListAdaptor(
                                ServerResponce.this, R.layout.list_item, tobj));
           }
      }
      private class tListAdaptor extends ArrayAdapter&lt;listobj&gt; {
              private ArrayList&lt;listobj&gt; tobj;
              public tListAdaptor(Context context,int textViewResourceId,ArrayList&lt;listobj&gt; items)
              {
  
                        super(context, textViewResourceId, items);
                        this.tobj = items;
              }
              @Override
              public View getView(int position, View convertView, ViewGroup parent) {
                      View v = convertView;
                      if (v == null) {
                              LayoutInflater vi = (LayoutInflater)
                                       getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                              v = vi.inflate(R.layout.list_item, null);
  
                      }
                      listobj o = tobj.get(position);
  
  
                      TextView tt = (TextView) v.findViewById(R.id.toptext);
                      TextView bt = (TextView) v.findViewById(R.id.bottomtext);
                      TextView bt1 = (TextView) v.findViewById(R.id.bottomtext1);
                      TextView bt2 = (TextView) v.findViewById(R.id.bottomtext2);
                      bt.setText("CAB NAME: " +o.author);
                      bt1.setText("CAB ID:  " +o.cabid);
                      tt.setText("PRICE:  " +o.content); 
                      bt2.setText("CAB RATING:  " +o.cabrat);
                      return v;
              }
         }
      public String getItem(int position) {
          // TODO Auto-generated method stub
          return null;
      }
  }
  </code></pre>
  
  <p>xml file is...</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android= "http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
      &gt;
  
      &lt;RelativeLayout xmlns:android= "http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:paddingTop="6dip"&gt;
  
     &lt;TextView android:id="@+id/text" android:layout_width="fill_parent"
        android:layout_height="wrap_content"
         android:singleLine="false" 
         android:text=" "
         android:textStyle="italic"
         /&gt;
         &lt;Button 
           android:text="auto book" 
           android:id="@+id/autobook"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content" 
           android:layout_below="@id/text"/&gt;
            &lt;Button 
           android:text="cancel" 
           android:id="@+id/cancel"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content" 
           android:layout_below="@id/text"
           android:layout_toRightOf="@id/autobook"/&gt;
  
    &lt;/RelativeLayout&gt;
             &lt;LinearLayout
         android:orientation="vertical"
         android:layout_width="fill_parent"
         android:layout_height="fill_parent"
         android:layout_weight="1"&gt;
  
    &lt;TextView android:id="@+id/toptext" android:layout_width="fill_parent"
        android:layout_height="wrap_content"
         android:singleLine="true"
         android:text=" " /&gt;
    &lt;TextView android:id="@+id/bottomtext" android:layout_width="fill_parent"
        android:layout_height="wrap_content"
         android:singleLine="true" /&gt;
        &lt;TextView android:id="@+id/bottomtext1" android:layout_width="fill_parent"
        android:layout_height="wrap_content"
         android:singleLine="true"
         android:text=" " /&gt;
        &lt;TextView android:id="@+id/bottomtext2" android:layout_width="fill_parent"
        android:layout_height="wrap_content"
         android:singleLine="true" /&gt;
         &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>