android - View.postDelayed why is it an instance method? -


in android platform, view object has instance method postdelayed, according documentation:

causes runnable added message queue, run after specified amount of time elapses. runnable run on user interface thread.

my questions:

  1. why method has instance method of view?
  2. would different if call postdelayed in 1 view instead of another?

thanks.

why method has instance method of view?

it references mattachinfo data member, in current implementation, , in turn data member's mhandler, handler postdelayed() work (if mattachinfo not null). welcome read of in the source code.

would different if call postdelayed in 1 view instead of another?

in theory, 2 view instances work separate handler instances. however, standpoint of documented behavior, there should no difference.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -