How to move object in java?? | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
+ 2

How to move object in java??

New to Java -- i Imported a Image In Android studio. . i am using java. . i created a dice on which integer from 1-6 pop-ups every time i roll dice. I have stored that INTEGER VALUE into variable . . Now i want to use that value to make my Imported image move in x-y direction. .How can i do That? Any help would be appreciated Thankyou.

2nd Mar 2019, 12:29 PM
Suraj kushwaha
Suraj kushwaha - avatar
3 ответов
+ 2
merkrafter . getResources And getIdentifier
2nd Mar 2019, 3:04 PM
Suraj kushwaha
Suraj kushwaha - avatar
0
What methods does your image class offer?
2nd Mar 2019, 1:46 PM
merkrafter
0
Okay, so this isn't too easy. In this case, however, I'll try to guide you through the steps that I would take to solve the problem. The following steps now would be: • Does the documentation mention moving? • Are there test cases that show moving? • Is there a super class that has a method to move the image? • Is there a static class that takes an image object as an argument and moves it? • Are there methods to move the Resources/Identifier object of your image?
2nd Mar 2019, 6:45 PM
merkrafter