【发布时间】:2015-07-02 10:28:09
【问题描述】:
我想将this activity 发送给class,但无法正常工作
main.java:
新线程(new Runnable() {
@Override
public void run() {
final LinearLayout lnrPost = (LinearLayout) findViewById(R.id.lnrPost);
Cmd.readD(lnrPost, this);
......
cmd.java:
public class cmd {
public static void readD(LinearLayout viewMain, Activity context) {
LayoutInflater inflater = context.getLayoutInflater();
View viewIn = inflater.inflate(R.layout.post, null);
......
错误:
The method readD(LinearLayout, Activity) in the type Cmd is not applicable for the arguments (LinearLayout, new Runnable(){})
【问题讨论】:
-
我的回答错了,对不起@Mohammad。检查其他答案,他们是对的。我误解了这个问题。
标签: android multithreading android-activity