It seems like I have a problem with java code where I want to use LayoutParams in while loop.
So in this code, I thought it might be like this but not working.
If is width and height of the image > 0 , then start looping by subtracting height and width till 0.
Does anyone have some fix for this?
Here is the code:
public void run() {
ViewGroup.LayoutParams params = myBall.getLayoutParams();
while ((params.height > 0) && (params.width > 0)) {
params.width--;
params.height--;
myBall.setLayoutParams(params);
}}