MvvMCross binds to <include> in android layout
Is it possible to associate an object Xwith an include tag so that the binding context is in the included layout X? I want to use the layout several times, but not on the list.
MainLayout.xml
...
<include
android:id="@+id/btnDealerMap"
android:layout_width="64dp"
android:layout_height="64dp"
android:visibility="gone"
layout="@layout/ServiceBarButtonPhone"
local:MvxBind="??? X" />
...
ServiceBarButtonPhone.xml
Titleand Textare properties X.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res/..."
android:layout_width="96dp"
android:layout_height="96dp">
<TextView
...
android:id="@+id/txtTitle"
local:MvxBind="Text Title" />
<TextView
...
android:id="@+id/txtText"
local:MvxBind="Text Text" />
</RelativeLayout>
+4
1 answer
include, - . . : https://github.com/MvvmCross/MvvmCross-Tutorials/blob/master/ApiExamples/ApiExamples.Droid/Resources/Layout/Test_If.axml
"" DataContext, MvxView - , . MvxFrameControl - N = 26 - . https://github.com/MvvmCross/NPlus1DaysOfMvvmCross/blob/b405eef7dddf4d65b00116e142855653eae9f06b/N-26-Fraggle/Rock.Droid/Resources/Layout/FirstView.axml
+4