Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Trendy Android 2016

Trendy Android 2016

What is trendy in Android in 2016. During this talk we review the libraries and frameworks that most people use.

Karumi

June 21, 2016
Tweet

More Decks by Karumi

Other Decks in Programming

Transcript

  1. <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@{user.firstName}"/> @Override protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState); MainActivityBinding binding = DataBindingUtil.setContentView (this, R.layout.main_activity); User user = new User("Test", "User"); binding.setUser(user); }
  2. Mem Cache class ExampleActivity extends Activity { @Bind(R.id.title) TextView title;

    @Bind(R.id.subtitle) TextView subtitle; @Bind(R.id.footer) TextView footer; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.simple_activity); ButterKnife.bind(this); } }
  3. Mem Cache Dog dog = new Dog(); dog.setName("Rex"); dog.setAge("1"); //

    Persist your data easily realm.beginTransaction(); realm.copyToRealm(dog); realm.commitTransaction(); // Query Realm for all dogs less than 2 years old RealmResults<Dog> puppies = realm.where(Dog.class).lessThan("age", 2).findAll();
  4. Mem Cache public class MainActivity() : ActionBarActivity() { override fun

    onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) } override fun onCreateOptionsMenu(menu: Menu?): Boolean { getMenuInflater().inflate(R.menu.main, menu) return true } override fun onOptionsItemSelected(item: MenuItem?): Boolean { val id = item!!.getItemId() if (id == R.id.action_settings) { return true } return super.onOptionsItemSelected(item) } }