I am doing admin page. I want to make changes to the data from server. The data already retrieved from server, but I do not know how to data can carry to the next activity(when i click Edit) using putExtra, because I use another java class to for retrieving the information. This is the sample of my table. Below is my java coding:
public class assessment_table_edit extends AppCompatActivity {
Toolbar toolbar;
String data = "";
TableLayout tlAssessment;
TableRow tr;
TextView stuID,totalmarks,marks,edit;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_assessment_table_edit);
tlAssessment=(TableLayout)findViewById(R.id.tlAssessment_Edit);
final Assessment_Information_GetData getdb=new Assessment_Information_GetData();
new Thread(new Runnable() {
@Override
public void run() {
data =getdb.getDataFromDB();
System.out.println(data);
runOnUiThread(new Runnable() {
@Override
public void run() {
ArrayList<Assessment_Information> users=parseJSON(data);
addData(users);
}
});
}
}).start();
}
View.OnClickListener onClickListener=new View.OnClickListener() {
@Override
public void onClick(View v) {
switch (v.getId()){
case R.id.assessment_id:
Intent iChange=new Intent(assessment_table_edit.this,change_details.class);
//Having problem here
iChange.putExtra();
startActivity(iChange);
break;
}
}
};
Appreciate if some can enlighten me on how to use putExtra or other method to carry the data to another activity.