![]() ![]() After the delay time is complete, then your main activity will be launched. ![]() You can implement it in the way you wish in your app. Congratulations, now you have an application with multi-themes. Post Delayed method will delay the time for 3 seconds. To make your chosen color applied in other activities, call this method setCustomizedThemes(this,getThemeColor(this)) in other activities’ onCreate() method and just before setContentView(). new Handler().postDelayed(new Runnable() method. Handlers are subclassed from the Android Handler class and can be used either by specifying a Runnable to be executed when required by the thread, or by overriding the handleMessage() callback method within the Handler subclass which will be called when messages are sent to the handler by a thread.Ī) To schedule messages and Runnables to be executed at some point in the futureī) To enqueue an action to be performed on a different thread than your own. Handlers are basically background threads which allows you to communicate with the UI thread (update the UI).
0 Comments
Leave a Reply. |