Skip to content

Instantly share code, notes, and snippets.

@v3n3
Last active October 17, 2016 21:45
Show Gist options
  • Select an option

  • Save v3n3/018cc94bf4e76ceaadfd49aa8d6b75e8 to your computer and use it in GitHub Desktop.

Select an option

Save v3n3/018cc94bf4e76ceaadfd49aa8d6b75e8 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"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="presenter"
type="com.example.MyPresenter"/>
<variable
name="model"
type="com.example.MyModel"/>
</data>
<android.support.design.widget.CoordinatorLayout
android:id="@+id/activity_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.TextInputEditText
android:layout_width="match_parent"
android:layout_height="80dp"
android:hint="@string/username"
android:text="@={model.username}"
android:maxLines="1"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:layout_margin="@dimen/fab_margin"
android:onClick="@{()-> presenter.makeServerCall(model)}"
app:srcCompat="@android:drawable/ic_menu_send"/>
</android.support.design.widget.CoordinatorLayout>
</layout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment