How to display RGB 565 byte array on the screen

by lohith » Mon, 27 Apr 2009 18:20:56 GMT

Sponsored Links

Can please anyone let me know how to display a raw RGB 565 byte array on the



How to display RGB 565 byte array on the screen

by Streets Of Boston » Mon, 27 Apr 2009 22:24:31 GMT

 Take a look at this method on

Bimtap BitmapFactory.decodeByteArray(byte[] data, int offset, int
length, BitmapFactory.Options opts)

and how to draw a Bitmap on the screen (onDraw; dispatchDraw; Canvas;


Sponsored Links

Other Threads

1. android on X86 will not boot after June 22nd

I don't have it at present.
Is there some good approach for generating the native stack trace? It seems
in my case, it just aborts and restarts the zygote again and again.

value doesn't belong to any dalvik heap.
one case I remembered:
IS_CLASS_FLAG_SET(clazz, CLASS_ISARRAY) in scanObject: caused segfault

Any plan to introduce the precise GC soon? Thanks.


2. showDialog and dismissDialog behave strangely when changing orientation

I am using the showDialog and dismissDialog methods to show progress
dialogs in my app. Moved from creating the dialog and calling show()
on it to using this in order to save state when changing orientation.
But when I change the orientation from portrait->landscape->portrait,
the dismissDialog method call no longer dismisses the dialog. The
dialog stay there all the time and I need to press the back button for
it to disappear.
To overcome this issue, I tried adding a removeDialog in onDestroy so
that the dialog is not created/displayed twice and before orientation
change, the dialog is removed. Tried adding log statements and this is
what happens
05-21 12:35:14.064: DEBUG/MyClass(193): *************callingShowDialog
05-21 12:35:14.064: DEBUG/MyClass(193): *************onCreareDialog

05-21 12:35:15.385: DEBUG/MyClass(193):
05-21 12:35:15.415: DEBUG/MyClass(193): *************onDestroy

05-21 12:35:15.585: DEBUG/MyClass(193): *************callingShowDialog
05-21 12:35:15.585: DEBUG/MyClass(193): *************onCreareDialog
05-21 12:35:15.715: DEBUG/MyClass(193): *************onCreareDialog
05-21 12:35:17.214: DEBUG/MyClass(193):
05-21 12:35:17.214: DEBUG/MyClass(193): *************onDestroy

05-21 12:35:17.275: ERROR/WindowManager(193):
android.view.WindowLeaked: Activity has leaked
that was originally added here
Some error statements....
05-21 12:35:17.395: DEBUG/MyClass(193): *************callingShowDialog
05-21 12:35:17.395: DEBUG/MyClass(193): *************onCreareDialog
05-21 12:35:17.475: DEBUG/MyClass(193): *************onCreareDialog

Initially when the activity is displayed, the onCreateDialog is called
once and on changing the orientation, onSaveInstanceState and
onDestroy are called.
But after that, onCreateDialog is called twice (once by a call to
showDialog which I make, but why the 2nd time?) and this happens every
time I change the orientation hence forth.
Any idea why that happens?

3. two questions about MediaPlayer

4. Could not find class

5. How to implement multi-windows in android?

6. how can I control the decoder class in OMX

7. Programmatically prevent Toast from appearing?