Friday, 6 June 2014

Update on 6th June

Hello it's Jia Wei this time round. This post will be more technical so please bear with it.

Nick and I are now implementing the "View" homework page, which allows one to view all their homework in a particular module.

This is how it looks:





Upon tapping a homework, the tab expands.


Upon pressing edit button:


Some of the problems we faced was the delete button problem. To remove a homework, we must remove it from the database, the view homework page and the homework page. To ensure a user experience, we tried to remove deleted homework as fast as possible. We did this by overriding onBackPressed() (this method is called whenever the android back button is pressed) but this method appears to have some loopholes.

The showing and hiding of information when the user tap their homework was manageable but tedious. Aside from changing the hidden information visibility, we also had to get the homework data from database and set them into separate containers. We also had to implement a random id generator to help randomise the id of these homework since each homework is unique.

As of now, we are trying to have the fields in Add Homework page filled up with information whenever the press the edit button. There is also the need to reformat how the date in the date field will appear. Oh, and set a limit to the year since once it hits 2038 for the calendar goes back to the 1900's after year 2036.

Some minor bugs discovered while blogging:
- Due date (both date and time) of homework are set to calendar mode. This means we can set a due date that has already passed. We'll need to set limits to this.

And... after some googling, turns out that Calendar provided by Android is buggy.
Okay, time to get Nick to help me out again...