this is what I did in the adapter class. but its not working. public View getView(int position, View convertView, ViewGroup parent) { ThumbnailProfile profile = profiles.get(position); LinearLayout thumbnailProfileView = new LinearLayout(online); thumbnailProfileView.setLayoutParams(new GridView.LayoutParams (85, 10)); thumbnailProfileView.setOrientation(LinearLayout.VERTICAL);
TextView username = new TextView(online); username.setText(profile.getUsername()); TextView basicInfo = new TextView(online); basicInfo.setText(profile.getAge() + ", " + profile.getHeight() + ", " + profile.getWeight()); ImageView imageView; if (convertView == null) { // if it's not recycled, initialize some attributes imageView = new ImageView(online); imageView.setLayoutParams(new GridView.LayoutParams(85, 85)); imageView.setScaleType(ImageView.ScaleType.FIT_CENTER); imageView.setPadding(8, 8, 8, 8); } else { imageView = (ImageView) convertView; } Bitmap pic = getImageBitmap(profiles.get (position).getProfilePicUrl()); imageView.setImageBitmap(pic); thumbnailProfileView.addView(username); thumbnailProfileView.addView(basicInfo); thumbnailProfileView.addView(imageView); return thumbnailProfileView; } -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en