How to order elements in Grid View

TPlenard

New Member
I have a Grid View adapter where all is in this code:\[code\]@Overridepublic View getView(int position, View convertView, ViewGroup parent) { // TODO Auto-generated method stub View v = convertView; CheckBox check = null; ImageView pic = null; if (convertView == null) { // if it's not recycled, initialize some // attributes LayoutInflater vi = (LayoutInflater)mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE); v = vi.inflate(R.layout.check_box_and_imageview, null); } pic = (ImageView)v.findViewById(R.id.imageView); check = (CheckBox) v.findViewById(R.id.checkBox); check.setTag(position); ImageLoader loader = new ImageLoader(mContext); //this loads image from given url loader.DisplayImage(url[position], pic); return v;}\[/code\]Here i create a view with check box and image view. There is the problem because image view is different size and gridview make aligment by both size checkbox and image view. But i want to order element by check box. For better explanation what i want to do will show this pic:
tX4Sd.png
This i want to do. How ever my image views isn't all same size. Now i will illustrate how it looks:
twNzn.png
So this don't suite me. I want to make alignment not all checkbox and imageview. But just that check boxes would be under checks boxes.So isn't this possible to do with gird view ?
 
Back
Top