package bmob.zm.com.mytask;
import java.io.Serializable;
/**
* Created by zhengmin on 2017/2/12.
*/
public class New implements Serializable{
private String title;
private String desc;
private int photoId;
/**
* Constructs a new instance of {@code Object}.
*/
public News(String name, String age, int photoId) {
this.title=name;
this.desc=age;
this.photoId=photoId;
}
public void setDesc(String desc) {
this.desc = desc;
}
public void setTitle(String title) {
this.title = title;
}
public void setPhotoId(int photoId) {
this.photoId = photoId;
}
public String getDesc() {
return desc;
}
public int getPhotoId() {
return photoId;
}
public String getTitle() {
return title;
}
}
private ImageView newsPhoto
private TextView newsTitle
private TextView newsDesc
Intent intent=getIntent()
New item= (New) intent.getSerializableExtra("New")
newsPhoto.setImageResource(item.getPhotoId())
newsTitle.setText(item.getTitle())
newsDesc.setText(item.getDesc())