Hi, gjs. I tested with this way, but the app always has performance issues
to use of the bitmap by long time. I am looking the way where I improve the
performance the app.
El sábado, 19 de diciembre de 2015, 1:45:22 (UTC-5), gjs escribió:
>
> Hi,
>
> Why not just -
>
> @Override
> public void onFrame(final Bitmap mBitmap) {
> try {
> if (mBitmap != null && headerImageView != null) {
> headerImageView.setImageBitmap(mBitmap);
> }
> } catch (Exception e) {
> e.printStackTrace();
> }
>
> }
>
>
> Regards
>
> On Saturday, December 19, 2015 at 8:12:58 AM UTC+11, fah127 wrote:
>>
>> 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/bc732f9d-e976-4a54-b117-85dbda658e6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.