Determining translationX/Y values for ObjectAnimator; how to move a view to an exact screen position?

I’m trying to move a view to the upper right corner of the screen, using ObjectAnimator.ofFloat(…) But, I’m not getting the results I expect. I’m getting the coordinates of the view beforehand, using ViewTreeListener, etc, and I already know the x value I need to offset from the end of the overall width. I can’t … Read more

How to implement a most-recently-used cache

Java Collections provide LinkedHashMap out of the box, which is well-suited to building caches. You probably don’t have this in Java ME, but you can grab the source code here: http://kickjava.com/src/java/util/LinkedHashMap.java.htm If you can’t just copy-paste it, looking at it should get you started implementing one for inclusion in your mobile app. The basic idea … Read more

How to memory profile in Java?

I’m still learning the ropes of Java so sorry if there’s a obvious answer to this. I have a program that is taking a ton of memory and I want to figure a way to reduce its usage, but after reading many SO questions I have the idea that I need to prove where the … Read more

SVN reverse merge?

If your repo was in pristine condition at revision 497, then I think you’re correct, you need to do a: That merge command will only change files in your working copy, so remember to also commit the changes to update HEAD in the repo. After you do the merge, followed by the commit, try comparing … Read more