Город МОСКОВСКИЙ
00:05:14

Android Studio - The Timer Function to schedule events!

Аватар
Kotlin Разработка Интернет-магазинов
Просмотры:
22
Дата загрузки:
02.12.2023 00:28
Длительность:
00:05:14
Категория:
Лайфстайл

Описание

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);

Рекомендуемые видео