Code example for SubscriptSpan

0
	 * @param starIndex 
	 * @param endIndex 
	 */ 
	public void getSubscriptSpan(SpannableString spannableString,
			int starIndex, int endIndex) {
		spannableString.setSpan(new SubscriptSpan(), starIndex, endIndex,
				Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
	} 
 
	/** 
	 * 设置上标 
	 *  
	 * @param spannableString 
	 * @param starIndex 
	 * @param endIndex 
	 */ 
	public void getSuperscriptSpan(SpannableString spannableString,
			int starIndex, int endIndex) {
		spannableString.setSpan(new SuperscriptSpan(), starIndex, endIndex,
				Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
	}