View vml.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.0.1", | |
"root": { | |
"kind": "flexbox", | |
"props": { | |
"flex-direction": "column", | |
"children": [ | |
{ | |
"kind": "text", | |
"props": { |
View vml.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.0.1", | |
"root": { | |
"kind": "flexbox", | |
"props": { | |
"flex-direction": "column", | |
"children": [ | |
{ | |
"kind": "text", | |
"props": { |
View hello-visly.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.0.1", | |
"root": { | |
"kind": "flexbox", | |
"props": { | |
"flex-direction": "column", | |
"children": [ | |
{ | |
"kind": "text", | |
"props": { |
View gist:211253741615d62d39fc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package se.emilsjolander.stickylistheaders.sample; | |
import android.annotation.TargetApi; | |
import android.content.res.Configuration; | |
import android.os.Build; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.support.v4.app.ActionBarDrawerToggle; | |
import android.support.v4.widget.DrawerLayout; | |
import android.support.v4.widget.SwipeRefreshLayout; |
View callbacks.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void onCreate() { | |
Sprinkles s = Sprinkles.init(this); | |
s.migrate( | |
new Migration() { | |
void onPreMigrate() { | |
// TODO query data in id column | |
} | |
void migrate() { |
View migrtions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
pros: | |
- Simple and little code | |
cons: | |
- What happens when an @Check annotation is removed form Note.class model? | |
Not intuitive that that column will be dropped and recreated | |
*/ | |
void onCreate() { |
View gist:9991234
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void onCreate() { | |
Sprinkles s = Sprinkles.init(this); | |
s.registerTypeSerializer(...) | |
s.registerTypeSerializer(...) | |
s.registerModel(Note.class) |