phamquangsang / WFTodo2

0 stars 0 forks source link

WF todo app for CoderSchool review #1

Open phamquangsang opened 8 years ago

phamquangsang commented 8 years ago

Here is my complete WF todo App. Please review. @coderschoolreview

coderschoolreview commented 8 years ago

Thank you for your Android submission, phamquangsang!

:ice_cream: Everything looks good with the format of your submission. We'll be reviewing your submission soon!

hoanle commented 8 years ago

Hi @phamquangsang

Thanks for submission

In general

Suggestion

What if 1 fails & 2 succeeds? The item is still in database but has been removed from the list?

phamquangsang commented 8 years ago

Hi @hoanle thank you for your feedback and suggestions.

On Sun, Feb 28, 2016 at 9:51 PM hoanle notifications@github.com wrote:

Hi @phamquangsang https://github.com/phamquangsang

Thanks for submission

In general

  • The app could not launch due to the crash java.lang.ClassCastException: android.graphics.drawable.ColorDrawable cannot be cast to android.support.v7.widget.RoundRectDrawableWithShadow for CardView, you should use setCardBackgroundColor instead of setBackgroundColor
  • All required features are done nicely.
  • Interesting layout. The swipe to delete action is cool
  • It's very nice that you use SQLiteDatabase, your custom adapter, fragment and cardview

Suggestion

  • You could make the code clearer and cleaner by shortening functions. Some are too long (for example onCreate of TodoDatabaseHelper)
  • I understand that you divide the project into module (like DetailListActivity, ToDoListActivity). My suggestion, it's more common that the project is arranged by type of class. In such way, adapter types should be in the same package, activity class should be in the same package.
    • For swipe to delete item
  • Action 1: Using AsyncTask to remove item from SQLite database
  • Action 2: Removing item from adapter

What if 1 fails & 2 succeeds? The item is still in database but has been removed from the list?

-

It's better to limit the logic implementation on onBindViewHolder, it should simply do the binding view action

You seems to like AsyncTask a lot. It's some kind of cool doing work in background thread. Be careful because it's very easy to have memory leak, database lock, update UI error and many other drawback. A good read dark side of asynctask http://bon-app-etit.blogspot.com/2013/04/the-dark-side-of-asynctask.html

— Reply to this email directly or view it on GitHub https://github.com/phamquangsang/WFTodo2/issues/1#issuecomment-189885640 .