我在Android网站上找到了带有参数的以下主题。 我搜索了许多论坛和教程,但仍然不理解。
我的问题是为什么我们可以在Thread:
中使用Surfaceholder,Context和Handler作为参数e.g。
Class MyThread extends Thread {
public Mythread(SurfaceHolder surfaceHolder, Context context, Handler handler){
....
}
...
但是,以下Thread类仅在Android网站中列出:
Thread()
Allocates a new Thread object.
Thread(Runnable target)
Allocates a new Thread object.
Thread(Runnable target, String name)
Allocates a new Thread object.
Thread(String name)
Allocates a new Thread object.
Thread(ThreadGroup group, Runnable target)
Allocates a new Thread object.
Thread(ThreadGroup group, Runnable target, String name)
Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group.
Thread(ThreadGroup group, Runnable target, String name, long stackSize)
Allocates a new Thread object so that it has target as its run object, has the specified name as its name, and belongs to the thread group referred to by group, and has the specified stack size.
Thread(ThreadGroup group, String name)
Allocates a new Thread object.