Code example for AbsListView

Methods: getItemAtPosition

0
	protected String getFloatText(AbsListView view, int firstVisibleItem,
			int visibleItemCount, int totalItemCount) {
		try { 
			//��listview�ؼ�item��ȡtext�ķ����е��ò����� 
			//View item = view.getChildAt(firstVisibleItem+(visibleItemCount/2)); 
			Cursor c = (Cursor) view.getItemAtPosition( firstVisibleItem+(visibleItemCount/2) );
			 
			if(c != null){
				if(c.getColumnCount() > 1){
					String string = c.getString( 1 );
					if( string != null && string.length()>0){
						return string.substring(0,1);
					} 
				} 
			} 
		} catch (Exception doNothing) {}
		return null; 
	} 
 
} 
Experience pair programming with AI  Get Codota for Java