Gallery Child View Problem

by Alekh » Tue, 14 Apr 2009 00:58:49 GMT

Sponsored Links
 I have created a child class from the Gallery view, named MyGallery. I
did this because I wanted to get rid of the onFling event in the
gallery view. Having that achieved, it lead me to a different problem.
Scrolling the Gallery with the Dpad doesn't work now. When I tried
using the original Gallery class, the dpad works fine. But when I
extend the Gallery and use my custom gallery class, the dpad stops
working. Am I missing something? Please help.


Gallery Child View Problem

by Marco Nelissen » Tue, 14 Apr 2009 01:12:09 GMT

 How did you get rid of the onFling event? It sounds like whatever you
did to achieve that also broke scrolling.


Sponsored Links

Gallery Child View Problem

by Alekh » Tue, 14 Apr 2009 12:29:08 GMT

 Actually I wanted only one image to be scrolled at a time when we
swipe with the finger. Like the image viewer in the iPhone. Or like
the desktop screens that android has. So all i did is, I overrided the
onFling event and just returned true. So now, if i swipe with my
finger, i get only the next or the previous image. But it now doesn't
respond to the dpad. I dunno what is wrong. I tried requestFocus() but
nothing seems to work. Yes u r right. I dint want scrolling in
gallery. Any suggestions?

How do i get the default functionality of the gallery view by just
extending it? i.e. the dpad left and right keys.. Pls reply fast. I m
stuck here.


Gallery Child View Problem

by Alekh » Tue, 14 Apr 2009 13:02:48 GMT

 Ok the problem has been solved!!

When extending the GalleryView, if we set the spacing between images
using the setSpacing(), the Dpad doesn't allow scrolling. If we don't
use setSpacing(), the Dpad works as intended.

I would like to know if this is a bug or is it designed in this way.
Coz I don't understand why the dpad events dont work when setSpacing()
is used..

Pls reply..


Other Threads

1. How to edit Calendar in Android

I am about to write an application with calendar functionality.
It would be a waste to write own calendar module in my app, so I would
like to use Calendar included with Android.

Is there any possibility to edit calendar directly from my
If not, is there any better way to solve my problem than having my own
calendar application that would be synchronizing data through Google
Calnedar API?

With kind regards,


2. Android app naming policy


I would like to run multiple instances of same application for dev
How does app define it's name in the system, through which of the
files is that configured.



3. Disabling a button until a set day

4. Multiple Spinners

5. twitter integration

6. Anyone seeing mysterious application crashes lately?

7. Test