我是Java的初学者。
你知道这有什么问题吗?
我有 ActivityToSmartWatch 类
public class ActivityToSmartWatch extends BaseAdapter {
private Activity activity;
private ArrayList<String[]> data;
private static LayoutInflater inflater = null;
public String[] inkLevels = new String[5];
public final static String EXTRA_MESSAGE = "com.PrinterStatus.AppLab.MESSAGE";
public ActivityToSmartWatch(Activity a, ArrayList<String[]> inkLevels) {
activity = a;
data = inkLevels;
inflater = (LayoutInflater) activity
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
在里面我有 GetInkLevel 类
public String[] getInkLevel (String [] inkLevels, int position)
{
for (int i= 0; i <data.size(); i++)
{
System.arraycopy(data.get(position), 0, inkLevels, 0, data.get(position).length);
}
return inkLevels;
}
在另一个类中,我想这样称呼它
ActivityToSmartWatch A2SSW = new ActivityToSmartWatch(activity, data);
A2SSW.getInkLevel(inkLevels, position);
我知道那是错的,你知道我犯了什么错误吗?