hi, all 

How do it Display Bitmaps frames per seconds in an ImageView efficiently ? 
I am displaying frames per seconds in ImageView from Camera, to prevent 
problems of the Memory Out Error, please

code:

@Override
public void onFrame(final Bitmap mBitmap) {
    if (headerImageView != null)
        headerImageView.post(new Runnable() {
            @Override
            public void run() {
                try {
                    if (mBitmap != null && headerImageView != null) {
                        Logger.logPrintMessage("ONFRAMETest", 
"headerImageView", Constants.showLogs);
                        ((BitmapDrawable) 
headerImageView.getDrawable()).getBitmap().recycle();
                        headerImageView.setImageBitmap(mBitmap);
                        hideProgressDialog();
                    }
                } catch (NullPointerException e) {
                    e.printStackTrace();
                } catch (RuntimeException e) {
                    e.printStackTrace();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });

}

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/6be06503-191b-4cfc-adea-ff507ec7ee64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to