如何将 selectedPlayer 设置为其他班级的位置值?
我在这里阅读了一堆类似的问题,但我一直遇到与我的变量和函数的冲突。
ScoreList.java
public class ScoreList extends Activity {
Integer selectedPlayer = 0;
}
ScoreListAdapter.java
public class ScoreListAdapter extends ArrayAdapter<Score> {
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final OnClickListener lsScoreView = new OnClickListener() {
@Override
public void onClick(View v) {
//send position to main class here
}
};
}
}