public virtual void setViewBinder(android.widget.SimpleCursorAdapter.ViewBinder arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.widget.SimpleCursorAdapter._setViewBinder11925, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.widget.SimpleCursorAdapter.staticClass, global::android.widget.SimpleCursorAdapter._setViewBinder11925, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } }
public override void bindView(android.view.View view, android.content.Context context , android.database.Cursor cursor) { android.widget.SimpleCursorAdapter.ViewBinder binder = mViewBinder; int count = mTo.Length; int[] from = mFrom; int[] to = mTo; { for (int i = 0; i < count; i++) { android.view.View v = view.findViewById(to[i]); if (v != null) { bool bound = false; if (binder != null) { bound = binder.setViewValue(v, cursor, from[i]); } if (!bound) { string text = cursor.getString(from[i]); if (text == null) { text = string.Empty; } if (v is android.widget.TextView) { setViewText((android.widget.TextView)v, text); } else { if (v is android.widget.ImageView) { setViewImage((android.widget.ImageView)v, text); } else { throw new System.InvalidOperationException(v.GetType().FullName + " is not a " + " view that can be bounds by this SimpleCursorAdapter"); } } } } } } }
/// <summary>Sets the binder used to bind data to views.</summary> /// <remarks>Sets the binder used to bind data to views.</remarks> /// <param name="viewBinder"> /// the binder used to bind data to views, can be null to /// remove the existing binder /// </param> /// <seealso cref="bindView(android.view.View, android.content.Context, android.database.Cursor) /// ">bindView(android.view.View, android.content.Context, android.database.Cursor)</seealso> /// <seealso cref="getViewBinder()">getViewBinder()</seealso> public virtual void setViewBinder(android.widget.SimpleCursorAdapter.ViewBinder viewBinder ) { mViewBinder = viewBinder; }