Android: chronometer widget and layout() method could not work well at the same time
- by Lennard
I write a test android app, in which there are only two views, a chronometer and a imageview. Using the layout() method of the imageview to dynamically change the position of it, I wish to implement drag-and-drop effect. It does work.
However, each time the chronometer ticks, the imageview is always reverted to its original position, which seems that the whole screen is reloaded from the layout xml.
So, does anybody know how to prevent the imageview from reverting to the original place, and let chronometer and drag-and-drop effect coexist? Thx