ScrollView cycle?

by Michael Dorin » Fri, 23 Apr 2010 00:07:01 GMT


Sponsored Links
 Anyway to have a ScrollView cycle back to the beginning when the end
is reached....or to the end when trying to scroll past the beginning?

Thanks,

-Mike

--



ScrollView cycle?

by ~ TreKing » Fri, 23 Apr 2010 01:41:32 GMT


 



See this thread:


Sponsored Links


Other Threads

1. Help- Video Recording - Camcorder

Can anyone please let me know where can I get source code for
camcorder?

Also, it would be of much help to me if anyone could post a simple
example for video recording, please.

Thanks.
--~--~---------~--~----~------------~-------~--~----~

2. What is the best way to implement dynamic textures in OpenGL ES?

Hi All,

I have a texture-mapped cube based in part on the Kube API demo and
the Textured Cube example from anddev.org,  It is working fine using
bitmaps loaded from R.drawable.. what I need to do now is to make the
texture for each face dynamic (using Bitmaps created in code).  I'm
having trouble understanding how to change the textures on the fly and
I'm hoping someone can point me in the right direction..

This is the code that initially sets a texture:

                gl.glBindTexture(GL10.GL_TEXTURE_2D, texBuf.get(num));
                Bitmap bmp = 
BitmapFactory.decodeResource(context.getResources(),
id);
                int pixels[] = new int[TEX_SIZE * TEX_SIZE];
                bmp.getPixels(pixels, 0, TEX_SIZE, 0, 0, TEX_SIZE, TEX_SIZE);
                int pix1[] = new int[TEX_SIZE * TEX_SIZE];
                for (int i = 0; i < TEX_SIZE; i++)
                {
                        for (int j = 0; j < TEX_SIZE; j++)
                        {
                                //correction of R and B
                                int pix = pixels[i * TEX_SIZE + j];
                                int pb = (pix >> 16) & 0xff;
                                int pr = (pix << 16) & 0x00ff0000;
                                int px1 = (pix & 0xff00ff00) | pr | pb;
                                //correction of rows
                                pix1[(TEX_SIZE - i - 1) * TEX_SIZE + j] = px1;
                        }
                }

                IntBuffer tbuf = IntBuffer.wrap(pix1);
                tbuf.position(0);
                gl.glTexImage2D(GL10.GL_TEXTURE_2D, 0, GL10.GL_RGBA, TEX_SIZE,
TEX_SIZE, 0, GL10.GL_RGBA, GL10.GL_UNSIGNED_BYTE, tbuf);
                gl.glTexParameterx(GL10.GL_TEXTURE_2D, 
GL10.GL_TEXTURE_MIN_FILTER,
GL10.GL_LINEAR);
                gl.glTexParameterx(GL10.GL_TEXTURE_2D, 
GL10.GL_TEXTURE_MAG_FILTER,
GL10.GL_LINEAR);

What would I need to change in this code to allow an existing texture
to be replaced (eg. a new Bitmap would be passed in instead of loading
the resource, but when I try this the texture remains unchanged).

Thanks!


--~--~---------~--~----~------------~-------~--~----~

3. playing audio on timeout using ANPAudioInterface in C++

4. does anyone know how to unlock a G1 phon

5. Register Receiver to Listen for Application Update

6. Question about GENERATING key strokes and DYNAMIC selection of list items.

7. Getting a reference to the option menu.