xamarin - Change Background Color of MvxItemTemplate? -


how 1 change background color of mvxitemtemplate?

i can change background of mvxlistview, changes background of elements.

here's relevant code:

<mvvmcross.binding.droid.views.mvxlistview         android:id="@+id/favoriteslist"         android:layout_width="fill_parent"         android:layout_height="wrap_content"         local:mvxitemtemplate="@layout/template_screen"         local:mvxbind="itemssource favoritesgroupedlist; itemclick screenselectedcommand; itemlongclick showunfavoritecommand" /> 

if place backgroundcolor blackorbluecolor(isunfavorite) in local:mvxbind listview, works. tried place binding in template:

?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="horizontal"     android:layout_width="fill_parent"     android:layout_height="fill_parent" >     <textview         android:id="@+id/screenicon"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginleft="20dp"         android:layout_marginright="10dp"         android:layout_marginbottom="10dp"         android:layout_margintop="10dp"         local:mvxbind="backgroundcolor blackorbluecolor(isunfavorite)"/>     <textview         android:id="@+id/screentext"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginbottom="10dp"         android:layout_margintop="10dp" /> </linearlayout> 

but doesn't work.

you can't change mvxitemtemplate background color, can change background color of root layout inside item template:

<linearlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:local="http://schemas.android.com/apk/res-auto"     android:orientation="horizontal"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     local:mvxbind="backgroundcolor blackorbluecolor(isunfavorite)"> 

Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -