Code example for ListView.FixedViewInfo

0
	private class ExtendedListView extends ListView {
		public FixedViewInfo info;
 
		public ExtendedListView(Context context) {
			super(context);
			info = new FixedViewInfo();
		} 
	} 
 
	@Override 
	public Builder setSingleChoiceItems(Cursor cursor, int checkedItem,
			String labelColumn, OnClickListener listener) {
		ListAdapter sourceAdapter = new SimpleCursorAdapter(activity,
				android.R.layout.select_dialog_singlechoice, cursor,
				new String[] { labelColumn }, new int[] { android.R.id.text1 });
		View view = activity.getLayoutInflater().inflate(
				android.R.layout.select_dialog_singlechoice, null, false);
		((TextView) view.findViewById(android.R.id.text1))
				.setText(R.string.nothing);
		FixedViewInfo info = new ExtendedListView(activity).info;
		info.view = view;