Newer
Older
DevAndroid / app / src / main / res / layout / fragment_main.xml
KeijuMatsumoto on 21 May 2018 869 bytes Added main ui
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto">

    <data>

        <variable
            name="mainViewModel"
            type="keijumt.devandroid.viewmodel.MainViewModel" />
    </data>

    <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <Button
            android:id="@+id/btn_start_api"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:onClick="@{() -> mainViewModel.startApi()}"
            android:text="api"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

    </android.support.constraint.ConstraintLayout>
</layout>