Tuesday, October 29, 2013

[android-developers] Re: how to make center image bigger than rest images , in gallery

guys, easier than u think:

      if (biggerImageAtPosition == position) {

                imageView.setPadding(padding, padding, padding, padding);

            } else {

                imageView.setPadding(padding, paddingForSmallerImage, padding, paddingForSmallerImage);

            }


so, just apply bigger padding for other images, and currently selected image, less padding )

results in bigger image :)


    public class GalleryOnItemSelectedListener implements OnItemSelectedListener {


        @Override

        public void onItemSelected(CustomAdapterView<?> parent, View view, int position, long id) {

            galleryAdapter.setShowImageBiggerAtPosition(position);

            galleryAdapter.notifyDataSetChanged();

        }


        @Override

        public void onNothingSelected(CustomAdapterView<?> parent) {

 

        }


    }


Am Dienstag, 12. Oktober 2010 07:25:10 UTC+2 schrieb Babita:
I am designing a screen , in which I am showing a gallery along with other UI components . The selected item is shown in the center of the gallery . I want to make the size of selected item somewhat bigger than the rest items of gallery . How I can do that 

Its urgent.....


thanks
Babita

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
---
You received this message because you are subscribed to the Google Groups "Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate