Able to continue working on the diary.
Fixed up the graphics and visual appearance a bit. Apparently, what I had before made the words too dark to see. Much more pleasant to the eye now. Or maybe its just my personal preference.
Worked on the Media screen. Spent a while thinking of ways to fix up the lag. I’m sure threading is the first thing I should try out. Luckily, I found this article, http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html. Very good information. Well, I followed their examples and adjusted what they did for asynchronously loading images and indeed, a lot of the lag was gone. However, I’m not too happy with the remaining lag. Since I was already loading up the images in another thread, I believe the lag might be coming from me constantly decoding my images each time. I’m going to make the assumption that I should store the decoded images in a cache folder and call that when I search for images. Took a look at more of the blog post and they had information about caches also. I adapted the cache to work with my code, but I didn’t notice a difference. Did some other changes I think that would help me increase the speed, but still looks like no changes at all.
I was ready to put that aside and work on my other parts until I noticed that I had never wrote the part of the code that actually saved the decoded files to the cache folder. No wonder it never found a image and went to decode an image. After I fixed up that problem, the lag was almost gone. However, there was still a bit of lag. Apparently, some images wouldn’t stay on the imageViews. I’m not sure was it because it was reusing the imageViews or was it just recycling them after they wont off the screen. I just know that because I still have to pull up the images, that should be the part still causing the lag. I finally noticed that I had a limit of 30 in the hashmap. After I increased the upper limit, my lag was gone! I’m extremely happy. Can’t wait to work on the next part. Which should be creating my own ListView.