XML and Mvx bindings
Our Android user interface will start at MainPage
, so we need to add a new file called MainPage.xml
, and a new MvxActivity
called MainPage.cs
. Firstly, add in a new folder called Views
; this is where we will be storing our MvxActivities
. Let's add a new file called MainPage.cs
to the Views
folder, and create a new file in the Resources | Layout folder called Main.xml
. Our Main.xml
is going to start with a LinearLayout
and contain four elements: ImageView
, TextView
, and two Buttons
:
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center"> <ImageView android:id="@+id/AudioImage" android:layout_width="200dp" android:layout_height="200dp" android:src="@drawable...