Beispiel #1
0
 public virtual void setViewBinder(android.widget.SimpleCursorTreeAdapter.ViewBinder arg0)
 {
     global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv;
     if (!IsClrObject)
     {
         @__env.CallVoidMethod(this.JvmHandle, global::android.widget.SimpleCursorTreeAdapter._setViewBinder11938, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
     else
     {
         @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.widget.SimpleCursorTreeAdapter.staticClass, global::android.widget.SimpleCursorTreeAdapter._setViewBinder11938, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0));
     }
 }
Beispiel #2
0
 private void bindView(android.view.View view, android.content.Context context, android.database.Cursor
                       cursor, int[] from, int[] to)
 {
     android.widget.SimpleCursorTreeAdapter.ViewBinder binder = mViewBinder;
     {
         for (int i = 0; i < to.Length; 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("SimpleCursorTreeAdapter can bind values"
                                                                        + " only to TextView and ImageView!");
                         }
                     }
                 }
             }
         }
     }
 }
Beispiel #3
0
 /// <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="getViewBinder()">getViewBinder()</seealso>
 public virtual void setViewBinder(android.widget.SimpleCursorTreeAdapter.ViewBinder
                                   viewBinder)
 {
     mViewBinder = viewBinder;
 }
		/// <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="getViewBinder()">getViewBinder()</seealso>
		public virtual void setViewBinder(android.widget.SimpleCursorTreeAdapter.ViewBinder
			 viewBinder)
		{
			mViewBinder = viewBinder;
		}