So, I\'ve followed this particular thread (How to stop scrolling in a Gallery Widget?) yet I am unable to get it to work properly.
I\'ve created a custom MyGallery c
Yes. You should just use com.gallerytest.mygallery instead of Gallery in XMLs. Everything will be working fine becuase mygallery is a subclass of Gallery. No need for imports in XML.
Changing the XML was key...i had been getting TypeCastException for sometime and couldn't find the reason in my code. Finally found in this post " You should just use com.gallerytest.mygallery instead of Gallery in XMLs" and solved my problem. thanks a lot.
Just add the attrSet param to the constructor of your custom gallery:
super(ctx, attrSet);
This worked for me. Leo Vannucci