public virtual void onClick(android.view.View v)
        {
            object tag = v.getTag();

            if (tag is java.lang.CharSequence)
            {
                mSearchView.onQueryRefine((java.lang.CharSequence)tag);
            }
        }
 public override android.view.View getView(int position, android.view.View convertView
                                           , android.view.ViewGroup parent)
 {
     try
     {
         return(base.getView(position, convertView, parent));
     }
     catch (java.lang.RuntimeException e)
     {
         android.util.Log.w(LOG_TAG, "Search suggestions cursor threw exception.", e);
         // Put exception string in item title
         android.view.View v = newView(mContext, mCursor, parent);
         if (v != null)
         {
             android.widget.SuggestionsAdapter.ChildViewCache views = (android.widget.SuggestionsAdapter
                                                                       .ChildViewCache)v.getTag();
             android.widget.TextView tv = views.mText1;
             tv.setText(java.lang.CharSequenceProxy.Wrap(e.ToString()));
         }
         return(v);
     }
 }
        public override void bindView(android.view.View view, android.content.Context context
                                      , android.database.Cursor cursor)
        {
            android.widget.SuggestionsAdapter.ChildViewCache views = (android.widget.SuggestionsAdapter
                                                                      .ChildViewCache)view.getTag();
            int flags = 0;

            if (mFlagsCol != INVALID_INDEX)
            {
                flags = cursor.getInt(mFlagsCol);
            }
            if (views.mText1 != null)
            {
                string text1 = getStringOrNull(cursor, mText1Col);
                setViewText(views.mText1, java.lang.CharSequenceProxy.Wrap(text1));
            }
            if (views.mText2 != null)
            {
                // First check TEXT_2_URL
                java.lang.CharSequence text2 = java.lang.CharSequenceProxy.Wrap(getStringOrNull(cursor
                                                                                                , mText2UrlCol));
                if (text2 != null)
                {
                    text2 = formatUrl(text2);
                }
                else
                {
                    text2 = java.lang.CharSequenceProxy.Wrap(getStringOrNull(cursor, mText2Col));
                }
                // If no second line of text is indicated, allow the first line of text
                // to be up to two lines if it wants to be.
                if (android.text.TextUtils.isEmpty(text2))
                {
                    if (views.mText1 != null)
                    {
                        views.mText1.setSingleLine(false);
                        views.mText1.setMaxLines(2);
                    }
                }
                else
                {
                    if (views.mText1 != null)
                    {
                        views.mText1.setSingleLine(true);
                        views.mText1.setMaxLines(1);
                    }
                }
                setViewText(views.mText2, text2);
            }
            if (views.mIcon1 != null)
            {
                setViewDrawable(views.mIcon1, getIcon1(cursor), android.view.View.INVISIBLE);
            }
            if (views.mIcon2 != null)
            {
                setViewDrawable(views.mIcon2, getIcon2(cursor), android.view.View.GONE);
            }
            if (mQueryRefinement == REFINE_ALL || (mQueryRefinement == REFINE_BY_ENTRY && (flags
                                                                                           & android.app.SearchManager.FLAG_QUERY_REFINEMENT) != 0))
            {
                views.mIconRefine.setVisibility(android.view.View.VISIBLE);
                views.mIconRefine.setTag(views.mText1.getText());
                views.mIconRefine.setOnClickListener(this);
            }
            else
            {
                views.mIconRefine.setVisibility(android.view.View.GONE);
            }
        }