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. [WTI] OOT; lesjaws comes to pekanbaru

Thanks atas kunjungannya boss lesjaw...
betah gw ngobrol ttg android....
Semoga sering datang ke pekanbaru...
Selamat menikmati WIFI pekanbaru yg maha dahsyat kunceeeng...wuzz..wuzzz



2. sms yang bisa di forward

Dearl all
spica ku program sms nya kok ngk isa di forward  hanya bisa replay aja.
ada ngk  program sms yang bisa di forward



3. Get a View resource ID within a view

4. HTML5 or Android

5. [WTA]Tentang ADW Ex Launcher

6. Help. fastboot recovery gak sukses di juned

7. [ASK]Crack WEP/WPA di Android?