Skip to content

Instantly share code, notes, and snippets.

@AnwarShahriar
Created December 21, 2016 13:52
Show Gist options
  • Save AnwarShahriar/fcc0580dc3b5683e8aceee4a1e297bad to your computer and use it in GitHub Desktop.
Save AnwarShahriar/fcc0580dc3b5683e8aceee4a1e297bad to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="me.anwarshahriar.twowayprimitive.MainActivity.User" />
<variable
name="user"
type="User" />
</data>
<LinearLayout
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp">
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="Age"
android:text="@={`` + user.age}" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="22sp"
android:text="@{String.valueOf(user.age)}"/>
</LinearLayout>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment