Android student management system

The user can enter three fields: name, gender and age. By clicking the add student button, the student information is displayed in the Scrollview control that starts empty. The Scrollview control can only wrap one control. What I wrap here is LinearLayout. Click the save data button to save the data to the SD card through the XmlSerializer object. When you click the recover data button, the data in the SD card file will be read out and echoed to the Scrollview. This is probably the function. Let's take a look at the specific code.

Because you want to read and write files, you need to add two permissions to the manifest file:

First, we draw the UI interface. The specific code and effect are as follows:

design sketch:

After that, we will create a student's domain, which includes three fields: name, age and sex. In order to facilitate viewing, I will also post all the student code:

After that, and most importantly, the implementation file of activity, I will directly post the code here because the comments are very clear:

You can try. If you have any questions, you can leave a message for discussion. I just learn Android. I hope you can correct me.

The above is the whole content of this article. I hope it will be helpful to your study, and I hope you can support programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>