Skip to content

Instantly share code, notes, and snippets.

View guilhermekrz's full-sized avatar

Guilherme Krzisch guilhermekrz

View GitHub Profile
@bdunovska
bdunovska / MainActivity.java
Created August 16, 2015 17:47
DataBindingExample
public class MainActivity extends AppCompatActivity {
private User user;
private LinearLayoutManager layoutManager;
private RecyclerView recyclerView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
@quanturium
quanturium / CursorRecyclerAdapter.java
Last active July 10, 2020 17:50
A simple implementation of CursorAdapter for the new RecyclerView. It is designed to work with CursorLoaders and do not register any content observer (which can cause leaks if not handled properly)
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 ARNAUD FRUGIER
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is