How to display RGB 565 byte array on the screen

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


Sponsored Links
 Hi,

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

Thanks.

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



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 developer.android.com:

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

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



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


Sponsored Links


Other Threads

1. ListActivity getSelectedItemId() and AlertDialog()

Hi all,

  I have a problem when using getSeletedItemId() for a ListActivity.
The code should do something like this:
1. User selects one row of the list.
2. User invokes the menu option "Delete row".
3. onOptionsItemSelected() handles that case and asks for
confirmation:

        case MENU_ID_DEL:
            // Delete row
            rowId = getSelectedItemId();
            if (rowId >= 0) {
                Log.i(TAG, "Deleting row: " + rowId);
                AlertDialog ad = new AlertDialog.Builder(this)
                    .setIcon(android.R.drawable.ic_dialog_alert)
                    .setTitle(R.string.confirm_delete)
                    .setPositiveButton(R.string.yes, new
DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int 
whichButton) {
                                // User clicked Yes so delete the contexts.
                                deleteSelectedRow();
                            }
                        })
                    .setNegativeButton(R.string.no, new
DialogInterface.OnClickListener() {
                            public void onClick(DialogInterface dialog, int 
whichButton) {
                                // User clicked No so don't delete (do nothing).
                            }
                        })
                    .show();
            }
            return true;

  It is unexpected to me that when calling getSelectedItemId() from
deleteSelectedRow() it returns -9223372036854775808.
  However if I use this code instead it works fine:
        case MENU_ID_DEL:
            // Delete row
           deleteSelectedRow();
            return true;

  Any ideas of my mistake?

  BTW, isn't it inconsistent to have a getSelectedItemId() for the
ListActivity and getSelectedId() for the ExpandableListActivity?

  Thank you for your responses.

  Best regards,

   Jorge
--~--~---------~--~----~------------~-------~--~----~

2. Quirky behavior when rotating screen in API Demos sample, Progress dialog

Yes the dialog should remain visible but be automatically dismissed
after the progress bar fills up, just like when one does not change
the screen orientation. It is the restarting of the application (I
noticed that in my own app) that apparently gets the running progress
dialog handling messed up in ways that are not obvious to circumvent.




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

3. Proxy - 0.9 Beta SDK

4. Cannot find symbol class android.view.MenuItem

5. peristiwa 65 tidak boleh dilupakan..

6. Getting log information

7. Layout Based on Orientation