Code example for SimpleCursorAdapter

Methods: setViewBinder

0
	private static final int SHORT_DESC_NUM_WORDS = 12;
	 
	public BoothDescriptionProductListAdapter(Context context, int layout, Cursor c, 
			String[] from, int[] to, int flags) {
		 
		super(context, layout, c, from, to, flags);
		setViewBinder(this);
	} 
	 
	 
	@Override 
	public boolean setViewValue(View view, Cursor cursor, int columnIndex) {
		// we only make a difference in the description text, where we want to just 
		// take the first 12 words and show them 
		if (view.getId() == com.envived.android.R.id.description_booth_product_description_short) {
			TextView shortDescView = (TextView) view;
			 
			String text = cursor.getString(columnIndex);
			String[] textArray = text.split(" ");
			 
			if (textArray.length <= SHORT_DESC_NUM_WORDS) {