title: Display a textview below a ImageView in a Gridview
body: <p>I try this:</p>
  
  <p><strong>main.xml</strong></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:orientation="horizontal"
  android:id="@+id/mainLayout"&gt;
  &lt;GridView
  android:layout_height="fill_parent"
  android:layout_width="fill_parent"
  android:numColumns="2"
  android:id="@+id/gridView1_bir"&gt;
  &lt;/GridView&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>grid_prueba1.xml</strong></p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
  
   &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  
  android:layout_height="wrap_content"
  android:background="#DC0000"
  android:orientation="vertical"
  android:layout_width="fill_parent"    
  android:id="@+id/relaGrid"
   &gt;
  
  
  &lt;ImageView
      android:id="@+id/img2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
  
       /&gt;
  
  &lt;TextView
      android:id="@+id/txt2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignBottom="@+id/img2"     
  
      android:text="TextView"
      android:textColor="#FFFFFF" /&gt;
  
   &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>ImgeAdapter.java</strong></p>
  
  <pre><code>   package es.ejemplo.gridviewprueba;
  
   import java.io.FileInputStream;
   import java.io.InputStream;
   import java.net.URI;
   import java.net.URL;
  
   import android.R.integer;
   import android.app.Activity;
   import android.content.Context;
   import android.graphics.BitmapFactory;
   import android.graphics.drawable.Drawable;
   import android.view.LayoutInflater;
   import android.view.View;
   import android.view.ViewGroup;
   import android.widget.BaseAdapter;
   import android.widget.GridView;
   import android.widget.ImageView;
   import android.widget.ListAdapter;
   import android.widget.RelativeLayout;
   import android.widget.TextView;
  
      public class ImageAdapter extends BaseAdapter implements ListAdapter {
  
  private Context context;
  public ImageAdapter(Context context) {
      super();
      this.context = context;
      GridViewConfig.addImageUrls();
  }
  
  @Override
  public int getCount() {
      return GridViewConfig.getResim_list().size();
  }
  
  @Override
  public Object getItem(int position) {
  
      return GridViewConfig.getResim_list().get(position);
  }
  
  @Override
  public long getItemId(int position) {
  
      return position;
  }
  
  @Override
  public View getView(int position, View convertView, ViewGroup parent) {
  
      View myView;
  
      if(convertView==null)
      {
  
          LayoutInflater li = ((Activity)context).getLayoutInflater();
          myView = li.inflate(R.layout.grid_prueba1, null);
          myView.setLayoutParams(new GridView.LayoutParams(100,100));
          myView.setPadding(5,5,5,5);
  
  
      }else{
  
          myView = (View)convertView;
  
      }
  
      ImageView img = (ImageView)myView.findViewById(R.id.img2);
          img.setImageDrawable(LoadImageFromURL(GridViewConfig.getResim_list().get(position)));
      TextView txt = (TextView)myView.findViewById(R.id.txt2);
      txt.setText("Adept0000"+position);
  
      return myView;
  }
  
  
  private Drawable LoadImageFromURL(String url)
  {
  try
  {
  InputStream is = (InputStream) new URL(url).getContent();
  
  Drawable d = Drawable.createFromStream(is, "src");
  return d;
  }catch (Exception e) {
  System.out.println(e);
  return null;
  }
  }
  
     }
  </code></pre>
  
  <p>And GridviewConfig is a class that loads the images urls.</p>
  
  <p>MyGridView.java</p>
  
  <pre><code>   package es.ejemplo.gridviewprueba;
  
   import android.app.Activity;
   import android.os.Bundle;
   import android.view.View;
  
   import android.widget.AdapterView;
   import android.widget.GridView;
   import android.widget.Toast;
  
  public class MyGridView extends Activity {
  private GridView girGridView;
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      girGridView=(GridView) findViewById(R.id.gridView1_bir);
  
      girGridView.setAdapter(new ImageAdapter(this));
  
      girGridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
  
          @Override
          public void onItemClick(AdapterView&lt;?&gt; arg0, View view, int position,long arg3) {
              Toast.makeText(getApplicationContext(), GridViewConfig.getResim_list().get(position), Toast.LENGTH_SHORT).show();
          }
      });
  }
  
  }
  </code></pre>
  
  <p><strong>With this code the gridview I load the images with text above. I pretend that the text is below a description or title of the picture.</strong> </p>
  
  <p>I've looked at several examples of imageview and gridview with texview but I could not solve my problem. Can you help me, please?</p>