monodroid - Custom Visibility Converter - Android - Release (MvvmCross) -
monodroid - Custom Visibility Converter - Android - Release (MvvmCross) -
i've developed application android using mvvmcross. there part of in should show either imageview or mvximageview. when test in debug mode works fine, when alter release mode visibility converter seem stop working. other converters work way should, converters stop working.
a resume xml:
<linearlayout     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:gravity="center"     android:orientation="vertical">     <imageview         android:layout_width="120dp"         android:layout_height="120dp"         android:scaletype="fitcenter"         local:mvxbind="visibility myobject, converter=byteinversevisibility; assetimagepath myobject, converter=attachmenttypetosource" />     <mvx.mvximageview         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_marginleft="20dp"         android:layout_marginright="20dp"         android:maxheight="150dp"         android:adjustviewbounds="true"         local:mvxbind="visibility myobject, converter=bytevisibility; bitmap myobject.attachment, converter=inmemoryimage" /> </linearlayout>    the converters:
public class bytevisibilityconverter : mvxbasevisibilityvalueconverter<myobjectclass> {     protected override mvxvisibility convert(myobjectclass value, object parameter, cultureinfo culture)     {         if (value.attachtype == attachmenttype.photo && value.attachment != null)         {              homecoming mvxvisibility.visible;         }           homecoming mvxvisibility.collapsed;     } }  public class byteinversevisibilityconverter : mvxbasevisibilityvalueconverter<myobjectclass> {     protected override mvxvisibility convert(myobjectclassvalue, object parameter, cultureinfo culture)     {         if (value.attachtype != attachmenttype.photo || value.attachment == null)         {              homecoming mvxvisibility.visible;         }           homecoming mvxvisibility.collapsed;     } }       
the reason because visibility property not beingness included in packaging.
you gotta add together like:
public void include(imageview imageview)     {         imageview.visibility = imageview.imageview;     }    in linkerpleaseinclude.cs file.
 android monodroid mvvmcross 
 
  
Comments
Post a Comment