I tried look for the answer ,found some but did not work for me. I want to wait 5 seconds before starting another public void method. The thread sleep was not working for me.Kindly give your suggestions,and if there is a way of "wait()" without using Threads I would love to know that.
public void check(){
//activity of changing background color of relative layout
}
I want to wait 3 seconds before changing the relative layout color.
just add one-liner with lambda
See if this works for you. Be sure to import the
android.os.Handler
you can use java handlers to achieve your task:
for more information read the following url:
https://developer.android.com/reference/android/os/Handler.html
I have been answering on another post, maybe it could help someone.
How to make Android wait?