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. SimpleCursorAdapter - change the way of binding cursor to view


I've got the following problem. I've got an sql table with the BLOB
field "title", a listview lv and cursor c.

If I use:
String[] from = new String[]{"title"};
int[] to = new int[]{};
SimpleCursorAdapter pins = new SimpleCursorAdapter(this, R.layout.row,
c, from, to);
the application will crash. I suppose that I need to convert the value
from "title"'s byte[] to String, but don't know how to do it.

Please help,


2. proxy settings for emulator

I want to set a proxy server for my android emulator but the setting
doesn't work.

I have tried with "./emulator -http-proxy" but I
don't have access to internet

Chihau Chau


3. Confusion about "Sorry! The application ____ (process ____) has stopped unexpectedly..." message

4. SDK for Mac Powerbook pre-Intel ?

5. Error in my application... please help me.. :(

6. Using Activity.openOptionsMenu()

7. Can I simulate the key event on the emulator?