# Rapid Guide on Two-Way Data Binding in Android

DevFeed: [Rapid Guide on Two-Way Data Binding in Android](<https://devfeed.tech/articles/rapid-guide-on-two-way-data-binding-in-android-38381.md>)

Original publisher: [Read original article](<https://meedamian.com/post/two-way-data-binding/>)

Author: hi@meedamian.com (Damian Mee)

Published: 2016-01-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [Damian Mee | Blog | Portfolio | About](<https://devfeed.tech/sources/damian-mee-blog-portfolio-about.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [MVVM](<https://devfeed.tech/topics/mvvm.md>), [Code](<https://devfeed.tech/topics/code.md>), [XML](<https://devfeed.tech/topics/xml.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [code](<https://devfeed.tech/tags/code.md>), [guide](<https://devfeed.tech/tags/guide.md>), [java](<https://devfeed.tech/tags/java.md>), [mvvm](<https://devfeed.tech/tags/mvvm.md>), [xml](<https://devfeed.tech/tags/xml.md>)

## AI overview

A concise Android tutorial showing the minimum setup needed to make two-way data binding work in an already configured project, using a simple UI, an Activity, a model, and a ViewModel.

## Source excerpt

This post is not a comprehensive introduction to data binding in Android, it's a required minimum to get two-way data binding to work, that assumes your project to be configured for data binding already (if it's not, start here). Complete source code available here or here. Structure: role file Activity: MainActivity.java Model: not relevant here View: activity_main.xml ViewModel: MainState.java Activity This one just glues stuff together: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.