public HeaderViewListAdapter(java.util.ArrayList<android.widget.ListView.FixedViewInfo > headerViewInfos, java.util.ArrayList<android.widget.ListView.FixedViewInfo> footerViewInfos , android.widget.ListAdapter adapter) { // These two ArrayList are assumed to NOT be null. // They are indeed created when declared in ListView and then shared. // Used as a placeholder in case the provided info views are indeed null. // Currently only used by some CTS tests, which may be removed. mAdapter = adapter; mIsFilterable = adapter is android.widget.Filterable; if (headerViewInfos == null) { mHeaderViewInfos = EMPTY_INFO_LIST; } else { mHeaderViewInfos = headerViewInfos; } if (footerViewInfos == null) { mFooterViewInfos = EMPTY_INFO_LIST; } else { mFooterViewInfos = footerViewInfos; } mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos) && areAllListInfosSelectable (mFooterViewInfos); }
public HeaderViewListAdapter(java.util.ArrayList <android.widget.ListView.FixedViewInfo > headerViewInfos, java.util.ArrayList <android.widget.ListView.FixedViewInfo> footerViewInfos , android.widget.ListAdapter adapter) { // These two ArrayList are assumed to NOT be null. // They are indeed created when declared in ListView and then shared. // Used as a placeholder in case the provided info views are indeed null. // Currently only used by some CTS tests, which may be removed. mAdapter = adapter; mIsFilterable = adapter is android.widget.Filterable; if (headerViewInfos == null) { mHeaderViewInfos = EMPTY_INFO_LIST; } else { mHeaderViewInfos = headerViewInfos; } if (footerViewInfos == null) { mFooterViewInfos = EMPTY_INFO_LIST; } else { mFooterViewInfos = footerViewInfos; } mAreAllFixedViewsSelectable = areAllListInfosSelectable(mHeaderViewInfos) && areAllListInfosSelectable (mFooterViewInfos); }
private int measureContentWidth(android.widget.ListAdapter adapter) { // Menus don't tend to be long, so this is more sane than it looks. int width = 0; android.view.View itemView = null; int itemType = 0; int widthMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec(0, android.view.View .MeasureSpec.UNSPECIFIED); int heightMeasureSpec = android.view.View.MeasureSpec.makeMeasureSpec(0, android.view.View .MeasureSpec.UNSPECIFIED); int count = adapter.getCount(); { for (int i = 0; i < count; i++) { int positionType = adapter.getItemViewType(i); if (positionType != itemType) { itemType = positionType; itemView = null; } if (mMeasureParent == null) { mMeasureParent = new android.widget.FrameLayout(mContext); } itemView = adapter.getView(i, itemView, mMeasureParent); itemView.measure(widthMeasureSpec, heightMeasureSpec); width = System.Math.Max(width, itemView.getMeasuredWidth()); } } return(width); }
/// <summary><p>Creates a new ListAdapter wrapper for the specified adapter.</p></summary> /// <param name="adapter">the Adapter to transform into a ListAdapter</param> public DropDownAdapter(android.widget.SpinnerAdapter adapter) { this.mAdapter = adapter; if (adapter is android.widget.ListAdapter) { this.mListAdapter = (android.widget.ListAdapter)adapter; } }
/// <summary>Provide the cursor for the list view.</summary> /// <remarks>Provide the cursor for the list view.</remarks> public virtual void setListAdapter(android.widget.ListAdapter adapter) { lock (this) { ensureList(); mAdapter = adapter; mList.setAdapter(adapter); } }
public override void setAdapter(android.widget.ListAdapter arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.widget.ExpandableListView._setAdapter11240, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.widget.ExpandableListView.staticClass, global::android.widget.ExpandableListView._setAdapter11240, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } }
public virtual bool isEnabled(int position) { android.widget.ListAdapter adapter = mListAdapter; if (adapter != null) { return(adapter.isEnabled(position)); } else { return(true); } }
public virtual bool areAllItemsEnabled() { android.widget.ListAdapter adapter = mListAdapter; if (adapter != null) { return(adapter.areAllItemsEnabled()); } else { return(true); } }
public virtual void setListAdapter(android.widget.ListAdapter arg0) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; if (!IsClrObject) { @__env.CallVoidMethod(this.JvmHandle, global::android.app.ListActivity._setListAdapter661, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } else { @__env.CallNonVirtualVoidMethod(this.JvmHandle, global::android.app.ListActivity.staticClass, global::android.app.ListActivity._setListAdapter661, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0)); } }
/// <summary>Provide the cursor for the list view.</summary> /// <remarks>Provide the cursor for the list view.</remarks> public virtual void setListAdapter(android.widget.ListAdapter adapter) { bool hadAdapter = mAdapter != null; mAdapter = adapter; if (mList != null) { mList.setAdapter(adapter); if (!mListShown && !hadAdapter) { // The list was hidden, and previously didn't have an // adapter. It is now time to show it. setListShown(true, getView().getWindowToken() != null); } } }
public virtual android.app.AlertDialog.Builder setSingleChoiceItems(android.widget.ListAdapter adapter, int checkedItem, android.content.DialogInterfaceClass.OnClickListener listener) { throw new System.NotImplementedException(); }
private void ensureList() { if (mList != null) { return; } android.view.View root = getView(); if (root == null) { throw new System.InvalidOperationException("Content view not yet created"); } if (root is android.widget.ListView) { mList = (android.widget.ListView)root; } else { mStandardEmptyView = (android.widget.TextView)root.findViewById([email protected] .id.internalEmpty); if (mStandardEmptyView == null) { mEmptyView = root.findViewById(android.R.id.empty); } else { mStandardEmptyView.setVisibility(android.view.View.GONE); } mProgressContainer = root.findViewById([email protected]); mListContainer = root.findViewById([email protected]); android.view.View rawListView = root.findViewById(android.R.id.list); if (!(rawListView is android.widget.ListView)) { throw new java.lang.RuntimeException("Content has view with id attribute 'android.R.id.list' " + "that is not a ListView class"); } mList = (android.widget.ListView)rawListView; if (mList == null) { throw new java.lang.RuntimeException("Your content must have a ListView whose id attribute is " + "'android.R.id.list'"); } if (mEmptyView != null) { mList.setEmptyView(mEmptyView); } else { if (mEmptyText != null) { mStandardEmptyView.setText(mEmptyText); mList.setEmptyView(mStandardEmptyView); } } } mListShown = true; mList.setOnItemClickListener(mOnClickListener); if (mAdapter != null) { android.widget.ListAdapter adapter = mAdapter; mAdapter = null; setListAdapter(adapter); } else { // We are starting without an adapter, so assume we won't // have our data right away and start with the progress indicator. if (mProgressContainer != null) { setListShown(false, false); } } mHandler.post(mRequestFocus); }
/// <summary> /// Sets the adapter that provides the data and the views to represent the data /// in this popup window. /// </summary> /// <remarks> /// Sets the adapter that provides the data and the views to represent the data /// in this popup window. /// </remarks> /// <param name="adapter">The adapter to use to create this window's content.</param> public virtual void setAdapter(android.widget.ListAdapter adapter) { if (mObserver == null) { mObserver = new android.widget.ListPopupWindow.PopupDataSetObserver(this); } else { if (mAdapter != null) { mAdapter.unregisterDataSetObserver(mObserver); } } mAdapter = adapter; if (mAdapter != null) { adapter.registerDataSetObserver(mObserver); } if (mDropDownList != null) { mDropDownList.setAdapter(mAdapter); } }
public override void setAdapter(android.widget.ListAdapter adapter) { base.setAdapter(adapter); this.mAdapter = adapter; }
public virtual void setAdapter(android.widget.ListAdapter adapter) { this.mListAdapter = adapter; }
public HeaderViewListAdapter(java.util.ArrayList arg0, java.util.ArrayList arg1, android.widget.ListAdapter arg2) : base(global::MonoJavaBridge.JNIEnv.ThreadEnv) { global::MonoJavaBridge.JNIEnv @__env = global::MonoJavaBridge.JNIEnv.ThreadEnv; global::MonoJavaBridge.JniLocalHandle handle = @__env.NewObject(android.widget.HeaderViewListAdapter.staticClass, global::android.widget.HeaderViewListAdapter._HeaderViewListAdapter11390, global::MonoJavaBridge.JavaBridge.ConvertToValue(arg0), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg1), global::MonoJavaBridge.JavaBridge.ConvertToValue(arg2)); Init(@__env, handle); }