This post will gather all those little tricks that speed up your Android development, because I found I often get stuck because of poor documentation.
supply x and y, otherwise it won’t show up
set a background drawable, or it won’t react to touch events
You need a style with two items for animation to work http://stackoverflow.com/a/7550227/315306
Primary key must be defined
INTEGER PRIMARY KEY NOT NULL(WTF? Not null?) And be careful that if you use
INTEGER, you won’t have the autoincrement behavior
Primary key must be explicitly enabled with
PRAGMA foreign_keys = ON;(doc). Usually this is done inside
onOpen(SQLiteDatabase), after checking that the database is writeable
Use the class DatabaseUtils
- Batch removing children is tricky. First, you must
post()to the animator’s Handler. Then you need to set in and out animations to
null. Finally, removeViews(int start, int count) doesn’t work well, so you have to remove one child at a time, either with
CharSequence. It never returns
null, so you must check its length to tell if it’s empty.