#TODO
- Add an attribute for Parallax interpolator (1.5f by default)
MaterialViewPagerAnimator line 170 - Add an attribute for Header margin bottom (10 dp default)
MaterialViewPager line 163
#TODO
| public class OnItemClickListener(){ | |
| onItemClicked(int position, ViewHolder viewHolder); | |
| } | |
| recyclerView.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() { | |
| GestureDetector mGestureDetector; | |
| @Override | |
| public boolean onInterceptTouchEvent(RecyclerView view, MotionEvent e) { |
| @Model | |
| public class User { | |
| String name; | |
| int age; | |
| } | |
| List<User> user = UserDAO.findByAge(3); | |
| User user = UserDAO.findByAge(3).first(); |
| @Model | |
| public class User { | |
| String name; | |
| } | |
| public class UserEntity extends User implements DataBaseModel { | |
| long _id; | |
| public long getDatabaseModelId() { | |
| return _id; |
| UserEntityManager userEntityManager = new UserEntityManager(); | |
| List<User> users = userEntityManager.select() | |
| .fields(UserColumn.name, UserColumn.age) | |
| .age().equals(3) | |
| .asList(); | |
| List<String> usersNames = userEntityManager.select() | |
| .field(UserColumn.name) | |
| .asList(); |
| #ADD | |
| interface Callback<T>{ | |
| void onSuccess(); | |
| void onError(T data); | |
| } | |
| userEntityManager.addAsync(List<User> users, new Callback<List<User>>{ | |
| void onSuccess(){} | |
| void onError(List<User> data){} |
| public class MyView extends FrameLayout{ | |
| @Link int color = Color.Black; | |
| @Link("content") String content; | |
| @Link(android.R.attr.text) String text; | |
| public MyView(Context, Attrs){ | |
| Zelda.initialise(context, attrs); | |
| } |
| [ | |
| { | |
| "name" : "1", | |
| "imageUrl" : "https://gist.github.com/", | |
| "url" : "https://gist.github.com/" | |
| } | |
| ] |
| public class RxJavaSchedulersTestRule implements TestRule { | |
| @Override | |
| public Statement apply(final Statement base, Description description) { | |
| return new Statement() { | |
| @Override | |
| public void evaluate() throws Throwable { | |
| resetPlugins(); | |
| RxJavaPlugins.getInstance().registerSchedulersHook(new TestRxJavaSchedulersHook()); | |
| RxAndroidPlugins.getInstance().registerSchedulersHook(new TestRxAndroidSchedulersHook()); |
| protected void notifyChange(int oldCount, int newCount) { | |
| if (newCount == oldCount) { | |
| notifyItemRangeChanged(0, newCount); | |
| } else if (newCount < oldCount) { | |
| notifyItemRangeChanged(0, newCount); | |
| notifyItemRangeRemoved(newCount, oldCount); | |
| } else { //newCount > oldCount | |
| notifyItemRangeChanged(0, oldCount); | |
| notifyItemRangeInserted(oldCount + 1, newCount); |