title: Creating BaseAdapter for GridView android
body: <p>Basically i need to create:
  check box on left and image view on right. Something like this:</p>
  
  <p><img src="https://i.stack.imgur.com/xGzwj.png" alt="enter image description here"> </p>
  
  <p>These combination in portrait should be 3xN, N is int of row count. For this i thought would be good to use Grid View, but i don't have much experience with Grids. So i started to write adapters:</p>
  
  <p>I got this method:</p>
  
  <pre><code>@Override
  public View getView(int position, View convertView, ViewGroup parent) {
      // TODO Auto-generated method stub
  
      CheckBox check = null;
      ImageView pic = null;
  
      LinearLayout view = new LinearLayout(mContext);
      view.setOrientation(LinearLayout.VERTICAL);
  
          check = new CheckBox(mContext);
          check.setTag(position);
  
          view.addView(check); 
  
          pic = new ImageView(mContext);
          pic.setImageResource(R.drawable.btn_star);
  
          view.addView(pic); 
  
  
      return view;
  } 
  </code></pre>
  
  <p>and maybe there i should create one View of check box and image View. This worked but image is lower than check box, how to make them in one line ?</p>
  
  <p>Thanks.</p>