当前位置: 代码迷 >> Android >> 【android】在adapter中获取listview的范例
  详细解决方案

【android】在adapter中获取listview的范例

热度:31   发布时间:2016-04-28 01:51:44.0
【android】在adapter中获取listview的实例
	class TestAdapter extends BaseAdapter	{		@Override		public int getCount() {			// TODO Auto-generated method stub			return 0;		}		@Override		public Object getItem(int position) {			// TODO Auto-generated method stub			return null;		}		@Override		public long getItemId(int position) {			// TODO Auto-generated method stub			return 0;		}		@Override		public View getView(int position, View convertView, ViewGroup parent) {			// TODO Auto-generated method stub			//获得listview的实例			ListView listView = (ListView) parent;						return null;		}			}
参考http://stackoverflow.com/questions/13602390/is-it-possible-to-get-reference-to-listview-from-adapter-in-android
  相关解决方案