Set an ImageView at a particular position inside GridView

by tilo1583 » Mon, 10 May 2010 23:50:10 GMT


Sponsored Links
 I am using the GridView along with an ImageAdapter. The functionality
I want is that I select a particular image and drop it on to the
GridView. I want this image to snap to a cell closest to where it has
been dropped.

How do I tell the GridView (or the Adapter) to set this dropped Image
in the appropriate location?

--



Other Threads

1. Transparency with 2 .jpg files

Hi, I'd like to have transparent images in my android-game but since
we use lots of images, png24 filesizes are just too large. So I'm
trying to achieve the same effect with two jpg files, one the actual
image and the other the alpha-information. Here's how I did it so far:

        public void AddBitmap(Bitmap b, Bitmap alpha) {
                int w = b.getWidth();
                int h = b.getHeight();
                Bitmap bc = b.copy(Config.ARGB_8888, true);

                long tick = SystemClock.uptimeMillis();

                for (int x = 0; x < w; x++) {
                        for (int y = 0; y < h; y++) {
                                int c = b.getPixel(x, y);
                                bc.setPixel(
                                                x, y,
                                                Color.argb(
                                                                //
Calculate alpha value from grayscale jpg
                                                                255 - 
(int)(((float)alpha.getPixel(x, y) / (float)-16777216) *
(255)),
                                                                Color.red(c),
                                                                Color.green(c),
                                                                Color.blue(c)
                                                                )
                                                );

                        }
                }

                Bitmap bnew = bc.copy(Config.ARGB_8888, false);
                _bitmaps.add(bnew);
        }

However, this runs too slow (for a 169x127 picture it takes
350-400ms). Is there another way to accomplish the same, just a little
faster?

-- 

2. NetDragon... Where do your apps go?

So I was recently requested by a representative from NetDragon about
localizing my application to the Chinese market. For those of you who
have gotten this kind of an email, you know exactly what I'm talking
about. Anyway, I did some research on Google and found that most
people who have submitted their applications to NetDragon have had
successful results (as in not being scammed, ect.). After some
communication with them over email, I translated my app and handed it
over to them. Recently I've been trying to contact the guy who has
been very cooperative in handling the requests. I wanted to ask where
I could view my app, for example, where the web page my app was being
hosted on. He hasn't responded for about 3-4 days (it usually took him
a day to respond to previous emails). I was just wondering if any of
you guys had ever handed over your application and at least know where
it is right now. I would appreciate maybe a link to their website or
experiences you have had with them. Thank you in advance!

-- 

3. versionName in layout xml

4. Has anyone gotten the EAS synth plugin to work in a DAW?

5. Problem with SSL/TLS on Android

6. remap accelerometer coordinate system

7. Need Help on SQLITE ATTACH DATABASE COMMAND