Android Studio - The Timer Function to schedule events!
Описание
Learn the basics of the Timer function on android studio!
You could become better at Android Studio with these recommended books :-
(Program code and links below)
Learning Java by Building Android Games - https://amzn.to/2Bs3W5u
Java - A Beginner’s Guide - https://amzn.to/2A2yDyg
Beginning Android Programming with Android Studio - https://amzn.to/2SW7F2h
Android App Development for Dummies - https://amzn.to/2BpYksk
GitHub:
https://github.com/vivekCodes253/Android_Timer_Demo
Code:-
Timer t = new Timer();
final Button btn = (Button)findViewById(R.id.btn);
TimerTask tt = new TimerTask() {
@Override
public void run()
{
btn.setRotation(btn.getRotation()+10);
}
};
t.schedule(tt,0,1000);
Рекомендуемые видео



















