title: how to properly size an image view within a grid view on java side; android?
body: <p>this is my code to put some image doodads in my GridView </p>
  
  <pre><code>public View getView(int position, View convertView, ViewGroup parent) {
          ImageView v;
          if(convertView == null) {
              v = new ImageView(c);
              v.setLayoutParams(new GridView.LayoutParams(90,90));
              v.setScaleType(ImageView.ScaleType.CENTER_CROP);
              v.setPadding(2, 2, 2, 2);
          } else {
              v = (ImageView) convertView;
          }
  
          v.setImageDrawable(c.getResources().getDrawable(ops[position]));
          return v;
      }                                                                                      
  </code></pre>
  
  <p>but for smaller machines the layoutParams are too big, does anyone know how i can do like a (90dp, 90dp) for the width and height on the java side?  </p>