Canvas: trying to use a recycled bitmap android.graphics.Bitmap in Android

后端 未结 8 1705
忘掉有多难
忘掉有多难 2020-12-13 17:32

I am working on the crop image class, but encounter a recycled bit map problem:

03-02 23:14:10.514: E/AndroidRuntime(16736): FATAL EXCEPTION: Thread-1470
03-         


        
8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-13 17:59

    for me the problem was i was using an arraylist to store all the bitmap values inorder to parse them into an adapter, what i was doing was that i was resizing the bitmap and then re orienting them ( the same bitmap file ) and adding them both in the arraylist

    SOLUTION Created a temp instance of Bitmap and resized it and then reoriented the temp one and stored the second one in the arraylist and parsed to the adapter

提交回复
热议问题