摘要:
在Android中把内容写到XML文件中 saveXmlButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { List studentInfos = StudentInfo.initStudentInfos(); try { FileOutputStream os = openFileO... 阅读全文
摘要:
Gson可以实现对象与json字符串之间的转化,以下是在Android中的示例代码。Gson主页:https://code.google.com/p/google-gson/public class GsonActivity extends Activity { Button saveButton; Button loadButton; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); s... 阅读全文