title: how to add gridview image to linearlayout in android
body: <p>i want to add a images to grid view and then to linear layout.i tried below code</p>
  
  <pre><code>    protected LinearLayout asLayout(final String message,final String path,boolean back){
      LoaderImageView liv=new LoaderImageView(this,path);
      imageView = new ImageView(mContext);
      imageView.setLayoutParams(new GridView.LayoutParams(100,120));
      imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
      (imageView).setPadding(10, 10, 10, 10);
      liv.setBackgroundColor(0xFF000000);
  
  
  
  
           linearWrapper = new GridView(mContext);
  
      linearWrapper.addView(asLayout(fmsg,fpath,true));
              linearWrapper.addView(asLayout(smsg,spath,false));  
          linerLayout.addView(linearWrapper);
  </code></pre>
  
  <p>the gridview was added but the images in grid view are not added .so please tell me the solution to how to add the gridview images to linearlayout.</p>
  
  <p>Thanks in advance</p>
  
  <p>Best Regards</p>