use of android.text.style.RelativeSizeSpan in project material-calendarview by prolificinteractive.
the class OneDayDecorator method decorate.
@Override
public void decorate(DayViewFacade view) {
view.addSpan(new StyleSpan(Typeface.BOLD));
view.addSpan(new RelativeSizeSpan(1.4f));
}
use of android.text.style.RelativeSizeSpan in project Conversations by siacs.
the class MessageAdapter method displayHeartMessage.
private void displayHeartMessage(final ViewHolder viewHolder, final String body) {
if (viewHolder.download_button != null) {
viewHolder.download_button.setVisibility(View.GONE);
}
viewHolder.image.setVisibility(View.GONE);
viewHolder.messageBody.setVisibility(View.VISIBLE);
viewHolder.messageBody.setIncludeFontPadding(false);
Spannable span = new SpannableString(body);
span.setSpan(new RelativeSizeSpan(4.0f), 0, body.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new ForegroundColorSpan(activity.getWarningTextColor()), 0, body.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
viewHolder.messageBody.setText(span);
}
use of android.text.style.RelativeSizeSpan in project platform_frameworks_base by android.
the class Clock method getSmallTime.
private final CharSequence getSmallTime() {
Context context = getContext();
boolean is24 = DateFormat.is24HourFormat(context, ActivityManager.getCurrentUser());
LocaleData d = LocaleData.get(context.getResources().getConfiguration().locale);
final char MAGIC1 = '';
final char MAGIC2 = '';
SimpleDateFormat sdf;
String format = mShowSeconds ? is24 ? d.timeFormat_Hms : d.timeFormat_hms : is24 ? d.timeFormat_Hm : d.timeFormat_hm;
if (!format.equals(mClockFormatString)) {
mContentDescriptionFormat = new SimpleDateFormat(format);
/*
* Search for an unquoted "a" in the format string, so we can
* add dummy characters around it to let us find it again after
* formatting and change its size.
*/
if (mAmPmStyle != AM_PM_STYLE_NORMAL) {
int a = -1;
boolean quoted = false;
for (int i = 0; i < format.length(); i++) {
char c = format.charAt(i);
if (c == '\'') {
quoted = !quoted;
}
if (!quoted && c == 'a') {
a = i;
break;
}
}
if (a >= 0) {
// Move a back so any whitespace before AM/PM is also in the alternate size.
final int b = a;
while (a > 0 && Character.isWhitespace(format.charAt(a - 1))) {
a--;
}
format = format.substring(0, a) + MAGIC1 + format.substring(a, b) + "a" + MAGIC2 + format.substring(b + 1);
}
}
mClockFormat = sdf = new SimpleDateFormat(format);
mClockFormatString = format;
} else {
sdf = mClockFormat;
}
String result = sdf.format(mCalendar.getTime());
if (mAmPmStyle != AM_PM_STYLE_NORMAL) {
int magic1 = result.indexOf(MAGIC1);
int magic2 = result.indexOf(MAGIC2);
if (magic1 >= 0 && magic2 > magic1) {
SpannableStringBuilder formatted = new SpannableStringBuilder(result);
if (mAmPmStyle == AM_PM_STYLE_GONE) {
formatted.delete(magic1, magic2 + 1);
} else {
if (mAmPmStyle == AM_PM_STYLE_SMALL) {
CharacterStyle style = new RelativeSizeSpan(0.7f);
formatted.setSpan(style, magic1, magic2, Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
}
formatted.delete(magic2, magic2 + 1);
formatted.delete(magic1, magic1 + 1);
}
return formatted;
}
}
return result;
}
use of android.text.style.RelativeSizeSpan in project TextJustify-Android by bluejamesbond.
the class ChineseCharacterTest method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ArticleBuilder amb = new ArticleBuilder();
amb.append(testName, false, new RelativeSizeSpan(2f), new StyleSpan(Typeface.BOLD), new LeftSpan());
amb.append("<font color=0xFFC801>@levifan</font><font color=0x888888> Oct. 28, 2014</font>", true, new RelativeSizeSpan(0.8f), new StyleSpan(Typeface.BOLD));
amb.append("事訖乃返己轉身,可曰:以測機意」樂而不淫誨去出.,可曰:」誨耳出意.第十一回後竊聽己轉身訖乃返建章曰:.父親回衙汗流如雨玉,不題.,可事關雎覽誨" + ".汗流如雨覽吉安而來冒認收了」關雎出曰:矣玉,不題事父親回衙.父親回衙玉,不題吉安而來汗流如雨冒認收了.在一處己轉身訖乃返危德至" + ".建章曰:訖乃返以測機白圭志不稱讚分得意.己轉身樂而不淫建章曰:白圭志.誨意曰:去覽」耳矣.第八回」,可招」不題耳德泉淹曰:矣誨出事" + ".汗流如雨冒認收了吉安而來父親回衙玉,不題.矣出意曰:.己轉身事在一處出建章曰:樂而不淫,可後竊聽以測機去" + ".,愈聽愈惱饒爾去罷」此是後話也懊悔不了.玉,不題,可出汗流如雨父親回衙冒認收了耳關雎事曰:吉安而來.了」第一回不題第二回第九回第五回" + ".,愈聽愈惱此是後話饒爾去罷」.意,可此是後話,愈聽愈惱」也懊悔不了覽饒爾去罷」耳關雎.此是後話,愈聽愈惱也懊悔不了饒爾去罷」<font " + "color=0xFFC801>.意覽事出去.,愈聽愈惱饒爾去罷」也懊悔不了.第一回第三回德泉淹羨殺.了」第十回第八回.驚異第十回第五回第七回" + ".,可驚異曰:德泉淹矣覽第二回出」相域去.意第十一回事訖乃返己轉身耳去白圭志曰:.事」耳,可意關雎誨" + ".事,可父親回衙曰:意出冒認收了吉安而來」去.矣出意曰:.己轉身事在一處出建章曰:樂而不淫,可後竊聽以測機去" + ".,愈聽愈惱饒爾去罷」此是後話也懊悔不了.玉,不題,可出汗流如雨父親回衙冒認收了耳關雎事曰:吉安而來.了」第一回不題第二回第九回第五回" + ".,愈聽愈惱此是後話饒爾去罷」.意,可此是後話,愈聽愈惱」也懊悔不了覽饒爾去罷」耳關雎.此是後話,愈聽愈惱也懊悔不了饒爾去罷」.意覽事出去" + ".,愈聽愈惱饒爾去罷」也懊悔不了.第一回第三回德泉淹羨殺.了」第十回第八回.驚異第十回第五回第七回.,可驚異曰:德泉淹矣覽第二回出」相域去" + ".意第十一回事訖乃返己轉身耳去白圭志曰:.事」耳,可意關雎誨.事,可父親回衙曰:意出冒認收了吉安而來」去.矣出意曰:" + ".己轉身事在一處出建章曰:樂而不淫,可後竊聽以測機去.,愈聽愈惱饒爾去罷」此是後話也懊悔不了" + ".玉,不題,可出汗流如雨父親回衙冒認收了耳關雎事曰:吉安而來.了」第一回不題第二回第九回第五回.,愈聽愈惱此是後話饒爾去罷」" + ".意,可此是後話,愈聽愈惱」也懊悔不了覽饒爾去罷」耳關雎.此是後話,愈聽愈惱也懊悔不了饒爾去罷」.意覽事出去.,愈聽愈惱饒爾去罷」也懊悔不了" + ".第一回第三回德泉淹羨殺.了」第十回第八回.驚異第十回第五回第七回.,可驚異曰:德泉淹矣覽第二回出」相域去" + ".意第十一回事訖乃返己轉身耳去白圭志曰:.事」耳,可意關雎誨.事,可父親回衙曰:意出冒認收了吉安而來」去.", true, new RelativeSizeSpan(0.8f), new JustifiedSpan(), new MyQuoteSpan(0xFFFFC801), new StyleSpan(Typeface.ITALIC), new ForegroundColorSpan(0xFF555555));
amb.append("矣意去出,可耳.,可意去矣不題招」德泉淹了」第二回.覽意誨事.吉安而來玉,不題父親回衙冒認收了汗流如雨.德泉淹出第六回第八回意第一回耳,可」第五回矣" + ".樂而不淫建章曰:不稱讚第十一回訖乃返.吉安而來玉,不題父親回衙汗流如雨.曰:,可覽誨.不題德泉淹第二回第四回第十回第一回.去關雎出誨" + ".饒爾去罷」也懊悔不了此是後話,愈聽愈惱.己轉身誨意第十一回事後竊聽去矣,可分得意」曰:.意,可出關雎覽」矣耳.出,可」事曰:耳.耳出事去" + ".己轉身<font color=0xFFC801>訖乃返分得意.矣吉安而來」耳冒認收了汗流如雨覽事出,可.第八回相域第三回第十回第九回" + ".出意分得意耳覽誨第十一回關雎,可事白圭志.,愈聽愈惱饒爾去罷」也懊悔不了此是後話.矣意去出,可耳.,可意去矣不題招」德泉淹了」第二回" + ".覽意誨事.吉安而來玉,不題父親回衙冒認收了汗流如雨.德泉淹出第六回第八回意第一回耳,可」第五回矣.樂而不淫建章曰:不稱讚第十一回訖乃返" + ".吉安而來玉,不題父親回衙汗流如雨.曰:,可覽誨.不題德泉淹第二回第四回第十回第一回.去關雎出誨.饒爾去罷」也懊悔不了此是後話,愈聽愈惱" + ".己轉身誨意第十一回事後竊聽去矣,可分得意」曰:.意,可出關雎覽」矣耳.出,可」事曰:耳.耳出事去.己轉身訖乃返分得意" + ".矣吉安而來」耳冒認收了汗流如雨覽事出,可.第八回相域第三回第十回第九回.出意分得意耳覽誨第十一回關雎,可事白圭志" + ".,愈聽愈惱饒爾去罷」也懊悔不了此是後話.矣意去出,可耳.,可意去矣不題招」德泉淹了」第二回.覽意誨事.吉安而來玉,不題父親回衙冒認收了汗流如雨" + ".德泉淹出第六回第八回意第一回耳,可」第五回矣.樂而不淫建章曰:不稱讚第十一回訖乃返.吉安而來玉,不題父親回衙汗流如雨.曰:,可覽誨" + ".不題德泉淹第二回第四回第十回第一回.去關雎出誨.饒爾去罷」也懊悔不了此是後話,愈聽愈惱" + ".己轉身誨意第十一回事後竊聽去矣,</font>可分得意」曰:.意,可出關雎覽」矣耳.出,可」事曰:耳.耳出事去.己轉身訖乃返分得意" + ".矣吉安而來」耳冒認收了汗流如雨覽事出,可.第八回相域第三回第十回第九回.出意分得意耳覽誨第十一回關雎,可事白圭志" + ".,愈聽愈惱饒爾去罷」也懊悔不了此是後話.", true, new RelativeSizeSpan(0.8f), new JustifiedSpan());
amb.append("意關雎去覽矣曰:誨.去曰:覽關雎事意.意出關雎耳誨去覽.」事第八回不題曰:羨殺第三回誨第一回.去,可耳意關雎誨矣覽.曰:」出誨意事,可" + ".父親回衙汗流如雨玉,不題冒認收了.第十一回樂而不淫以測機建章曰:危德至.訖乃返不稱讚第十一回建章曰:意己轉身關雎事後竊聽曰:去誨覽" + ".去關雎耳,可」曰:矣.意矣」,可曰:.去意覽,可.父親回衙」出玉,不題誨事,可吉安而來冒認收了去曰:覽" + ".耳此是後話,愈聽愈惱也懊悔不了曰:矣饒爾去罷」去出」.冒認收了汗流如雨吉安而來.誨」矣關雎事曰:覽,可.誨」曰:耳覽去關雎意" + ".關雎事羨殺,可第十回耳了」招」矣德泉淹第七回覽去.饒爾去罷」也懊悔不了耳覽此是後話,愈聽愈惱,可矣」.第二回德泉淹第一回第七回不題第九回" + ".在一處以測機分得意不稱讚.矣,可事曰:去意」.也懊悔不了此是後話,愈聽愈惱饒爾去罷」.意關雎去覽矣曰:誨.去曰:覽關雎事意.意<font " + "color=0xFFC801>出關雎耳誨去覽.」事第八回不題曰:羨殺第三回誨第一回.去,可耳意關雎誨矣覽.曰:」出誨意事,可" + ".父親回衙汗流如雨玉,不題冒認收了.第十一回樂而不淫以測機建章曰:危德至.訖乃返不稱讚第十一回建章曰:意己轉身關雎事後竊聽曰:去誨覽" + ".去關雎耳,可」曰:矣.意矣」,可曰:.去意覽,可.父親回衙」出玉,不題誨事,可吉安而來冒認收了去曰:覽" + ".耳此是後話,愈聽愈惱也懊悔不了曰:矣饒爾去罷」去出」.冒認收了汗流如雨吉安而來.誨」矣關雎事曰:覽,可.誨」曰:耳覽去關雎意" + ".關雎事羨殺,可第十回耳了」招」矣德泉淹第七回覽去.饒爾去罷」也懊悔不了耳覽此是後話,愈聽愈惱,可矣」.第二回德泉淹第一回第七回不題第九回" + ".在一處以測機分得意不稱讚.矣,可事曰:去意」.也懊悔不了此是後話,愈聽愈惱饒爾去罷」.意關雎去覽矣曰:誨.去曰:覽關雎事意.意出關雎耳誨去覽" + ".」事第八回不題曰:羨殺第三回誨第一回.去,可耳意關雎誨矣覽.曰:」出誨意事,可.父親回衙汗流如雨玉,不題冒認收了" + ".第十一回樂而不淫以測機建章曰:危德至.訖乃返不稱讚第十一回建章曰:意己轉身關雎事後竊聽曰:去誨覽.去關雎耳,可」曰:矣.意矣」,可曰:" + ".去意覽,可.父親回衙」出玉,不題誨事,可吉安而來冒認收了去曰:覽.耳此是後話,愈聽愈惱也懊悔不了曰:矣饒爾去罷」去出」" + ".冒認收了汗流如雨吉安而來.誨」矣關雎事曰:覽</font>,可.誨」曰:耳覽去關雎意.關雎事羨殺,可第十回耳了」招」矣德泉淹第七回覽去" + ".饒爾去罷」也懊悔不了耳覽此是後話,愈聽愈惱,可矣」.第二回德泉淹第一回第七回不題第九回.在一處以測機分得意不稱讚.矣,可事曰:去意」" + ".也懊悔不了此是後話,愈聽愈惱饒爾去罷」.意關雎去覽矣曰:誨.去曰:覽關雎事意.意出關雎耳誨去覽.」事第八回不題曰:羨殺第三回誨第一回" + ".去,可耳意關雎誨矣覽.曰:」出誨意事,可.父親回衙汗流如雨玉,不題冒認收了.第十一回樂而不淫以測機建章曰:危德至" + ".訖乃返不稱讚第十一回建章曰:意己轉身關雎事後竊聽曰:去誨覽.去關雎耳,可」曰:矣.意矣」,可曰:.去意覽,可" + ".父親回衙」出玉,不題誨事,可吉安而來冒認收了去曰:覽.耳此是後話,愈聽愈惱也懊悔不了曰:矣饒爾去罷」去出」.冒認收了汗流如雨吉安而來" + ".誨」矣關雎事曰:覽,可.誨」曰:耳覽去關雎意.關雎事羨殺,可第十回耳了」招」矣德泉淹第七回覽去" + ".饒爾去罷」也懊悔不了耳覽此是後話,愈聽愈惱,可矣」.第二回德泉淹第一回第七回不題第九回.在一處以測機分得意不稱讚.矣,可事曰:去意」" + ".也懊悔不了此是後話,愈聽愈惱饒爾去罷」.", true, new RelativeSizeSpan(1.3f), new JustifiedSpan());
amb.append("誨曰:覽出關雎.曰:,可矣誨事.意誨耳關雎出曰:去.覽吉安而來出父親回衙汗流如雨意誨」,可關雎玉,不題.關雎」出意覽去矣.以測機在一處訖乃返建章曰:" + ".父親回衙汗流如雨吉安而來玉,不題.出曰:,可矣.曰:關雎誨覽耳.去父親回衙,可汗流如雨玉,不題意事誨曰:耳覽.關雎出,可意覽曰:」" + ".事曰:,可矣去誨關雎.事覽誨關雎出矣.貢院第九回不題羨殺第八回第三回.第四回第一回第九回貢院.,可曰:吉安而來父親回衙汗流如雨玉,不題耳意" + ".」曰:出關雎.第十回驚異德泉淹貢院.分得意己轉身建章曰:訖乃返.誨曰:覽出關雎.曰:,可矣誨事.意誨耳關雎出曰:去" + ".覽吉安而來出父親回衙汗流如雨意誨」,可關雎玉,不題.關雎」出意覽去矣.以測機在一處訖乃返建章曰:.父親回衙汗流如雨吉安而來玉,不題" + ".出曰:,可矣.曰:關雎誨覽耳.去父親回衙,可汗流如雨玉,不題意事誨曰:耳覽.關雎出,可意覽曰:」.事曰:,可矣去誨關雎.事<font " + "color=0xFFC801>覽誨關雎出矣.貢院第九回不題羨殺第八回第三回.第四回第一回第九回貢院.,可曰:吉安而來父親回衙汗流如雨玉,不題耳意" + ".」曰:出關雎.第十回驚異德泉淹貢院.分得意己轉身建章曰:訖乃返.誨曰:覽出關雎.曰:,可矣誨事.意誨耳關雎出曰:去" + ".覽吉安而來出父親回衙汗流如雨意誨」,可關雎玉,不題.關雎」出意覽去矣.以測機在一處訖乃返建章曰:.父親回衙汗流如雨吉安而來玉,不題" + ".出曰:,可矣.曰:關雎誨覽耳.去父親回衙,可汗流如雨玉,不題意事誨曰:耳覽.關雎出,可意覽曰:」.事曰:,可矣去誨關雎.事覽誨關雎出矣" + ".貢院第九回不題羨殺第八回第三回.第四回第一回第九回貢院.,可曰:吉安而來父親回衙汗流如雨玉,不題耳意</font>.」曰:出關雎" + ".第十回驚異德泉淹貢院.分得意己轉身建章曰:訖乃返.誨曰:覽出關雎.曰:,可矣誨事.意誨耳關雎出曰:去" + ".覽吉安而來出父親回衙汗流如雨意誨」,可關雎玉,不題.關雎」出意覽去矣.以測機在一處訖乃返建章曰:.父親回衙汗流如雨吉安而來玉,不題" + ".出曰:,可矣.曰:關雎誨覽耳.去父親回衙,可汗流如雨玉,不題意事誨曰:耳覽.關雎出,可意覽曰:」.事曰:,可矣去誨關雎.事覽誨關雎出矣" + ".貢院第九回不題羨殺第八回第三回.第四回第一回第九回貢院.,可曰:吉安而來父親回衙汗流如雨玉,不題耳意.」曰:出關雎.第十回驚異德泉淹貢院" + ".分得意己轉身建章曰:訖乃返.", true, new RelativeSizeSpan(0.8f), new JustifiedSpan());
amb.append("意矣去出誨關雎耳.饒爾去罷」此是後話也懊悔不了,愈聽愈惱.曰:」耳去事矣關雎出.去意出,可.曰:耳」事.耳覽去曰:矣事」意.不稱讚樂而不淫在一處己轉身" + ".第二回第九回第七回.第九回第二回第八回羨殺第六回.第四回第二回第五回羨殺.汗流如雨玉,不題吉安而來父親回衙" + ".玉,不題汗流如雨吉安而來冒認收了父親回衙.關雎誨曰:去.父親回衙冒認收了吉安而來.饒爾去罷」也懊悔不了,愈聽愈惱此是後話" + ".以測機不稱讚樂而不淫第十一回建章曰:.第三回」第二回第六回誨出了」第十回耳矣.出矣誨覽關雎」去事.也懊悔不了,愈聽愈惱饒爾去罷」" + ".第二回覽矣第一回」第七回相域誨意第八回去出.驚異意招」出第二回德泉淹第十回關雎覽第四回誨曰:.也懊悔不了事饒爾去罷」誨」此是後話出矣去覽意" + ".曰:出,可意意矣去出誨關雎耳.饒爾去罷」此是後話也懊悔不了,愈聽愈惱.曰:」耳去事矣關雎出.去意出,可.曰:耳」事.耳覽去曰:矣事」意" + ".不稱讚樂而不淫在一處己轉身.第二回第九回第七回.第九回第二回第八回羨殺第六回.第四回第二回第五回羨殺.汗流如雨玉,不題吉安而來父親回衙" + ".玉,不題汗流如雨吉安而來冒認收了父親回衙.關雎誨曰:去.父親回衙冒認收了吉安而來.饒爾去罷」也懊悔不了,愈聽愈惱此是後話" + ".以測機不稱讚樂而不淫第十一回建章曰:.第三回」第二回第六回誨出了」第十回耳矣.出矣誨覽關雎」去事.也懊悔不了,愈聽愈惱饒爾去罷」" + ".第二回覽矣第一回」第七回相域誨意第八回去出.驚異意招」出第二回德泉淹第十回關雎覽第四回誨曰:.也懊悔不了事饒爾去罷」誨」此是後話出矣去覽意" + ".曰:出,可意意矣去出誨關雎耳.饒爾去罷」此是後話也懊悔不了,愈聽愈惱.曰:」耳去事矣關雎出.去意出,可.曰:耳」事.耳覽去曰:矣事」意" + ".不稱讚樂而不淫在一處己轉身.第二回第九回第七回.第九回第二回第八回羨殺第六回.第四回第二回第五回羨殺.汗流如雨玉,不題吉安而來父親回衙" + ".玉,不題汗流如雨吉安而來冒認收了父親回衙.關雎誨曰:去.父親回衙冒認收了吉安而來.饒爾去罷」也懊悔不了,愈聽愈惱此是後話" + ".以測機不稱讚樂而不淫第十一回建章曰:.第三回」第二回第六回誨出了」第十回耳矣.出矣誨覽關雎」去事.也懊悔不了,愈聽愈惱饒爾去罷」" + ".第二回覽矣第一回」第七回相域誨意第八回去出.驚異意招」出第二回德泉淹第十回關雎覽第四回誨曰:.也懊悔不了事饒爾去罷」誨」此是後話出矣去覽意" + ".曰:出,可意意矣去出誨關雎耳.饒爾去罷」此是後話也懊悔不了,愈聽愈惱.曰:」耳去事矣關雎出.去意出,可.曰:耳」事.耳覽去曰:矣事」意" + ".不稱讚樂而不淫在一處己轉身.第二回第九回第七回.第九回第二回第八回羨殺第六回.第四回第二回第五回羨殺.汗流如雨玉,不題吉安而來父親回衙" + ".玉,不題汗流如雨吉安而來冒認收了父親回衙.關雎誨曰:去.父親回衙冒認收了吉安而來.饒爾去罷」也懊悔不了,愈聽愈惱此是後話" + ".以測機不稱讚樂而不淫第十一回建章曰:.第三回」第二回第六回誨出了」第十回耳矣.出矣誨覽關雎」去事.也懊悔不了,愈聽愈惱饒爾去罷」" + ".第二回覽矣第一回」第七回相域誨意第八回去出.驚異意招」出第二回德泉淹第十回關雎覽第四回誨曰:.也懊悔不了事饒爾去罷」誨」此是後話出矣去覽意" + ".曰:出,可意意矣去出誨關雎耳.饒爾去罷」此是後話也懊悔不了,愈聽愈惱.曰:」耳去事矣關雎出.去意出,可.曰:耳」事.耳覽去曰:矣事」意" + ".不稱讚樂而不淫在一處己轉身.第二回第九回第七回.第九回第二回第八回羨殺第六回.第四回第二回第五回羨殺.汗流如雨玉,不題吉安而來父親回衙" + ".玉,不題汗流如雨吉安而來冒認收了父親回衙.關雎誨曰:去.父親回衙冒認收了吉安而來.饒爾去罷」也懊悔不了,愈聽愈惱此是後話" + ".以測機不稱讚樂而不淫第十一回建章曰:.第三回」第二回第六回誨出了」第十回耳矣.出矣誨覽關雎」去事.也懊悔不了,愈聽愈惱饒爾去罷」" + ".第二回覽矣第一回」第七回相域誨意第八回去出.驚異意招」出第二回德泉淹第十回關雎覽第四回誨曰:.也懊悔不了事饒爾去罷」誨」此是後話出矣去覽意" + ".曰:出,可意", false, new RelativeSizeSpan(0.8f), new JustifiedSpan(), new StyleSpan(Typeface.ITALIC));
addDocumentView(amb, DocumentView.FORMATTED_TEXT);
}
use of android.text.style.RelativeSizeSpan in project TextJustify-Android by bluejamesbond.
the class ImageSpanTest method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ArticleBuilder ab = new ArticleBuilder().append(testName, false, new RelativeSizeSpan(2f), new StyleSpan(Typeface.BOLD), new LeftSpan()).append("<font color=0xFFC801>Justin Worland</font><font color=0x888888> @justinworland Oct. 25, 2014</font>", false, new RelativeSizeSpan(0.8f), new StyleSpan(Typeface.BOLD)).append("<font color=0x888888>Updated: Oct. 25, 2014 2:34 PM</font>".toUpperCase(), true, new RelativeSizeSpan(0.6f), new StyleSpan(Typeface.BOLD)).append("State health department staff will be on the ground at state airports", true, new RelativeSizeSpan(1.2f), new StyleSpan(Typeface.BOLD), new StyleSpan(Typeface.ITALIC));
for (int i = 0; i < 1; i++) ab.append("Healthcare workers returning to New York or New Jersey after treating Ebola patients in West Africa will be placed under a mandatory quarantine, officials announced Friday, one day after a Doctors Without Borders doctor was diagnosed with the virus in New York City. Illinois announced a similar policy Saturday, meaning it will be enforced in states with three of the five airports through which passengers traveling from the Ebola-stricken West African countries must enter the United States.", true, new RelativeSizeSpan(1f), new JustifiedSpan()).append("N.J. Gov. Chris Christie and N.Y. Gov. Andrew Cuomo made the announcement as part of a broader procedural plan to help protect the densely packed, highly populated area from any further spread of the disease.", true, new RelativeSizeSpan(0.8f), new JustifiedSpan(), new MyQuoteSpan(0xFFFFC801)).append("“Since taking office, I have erred on the side of caution when it comes to the safety and protection of New Yorkers, and the current situation regarding Ebola will be no different,” Gov. Cuomo said. “The steps New York and New Jersey are taking today will strengthen our safeguards to protect our residents against this disease and help ensure those that may be infected by Ebola are treated with the highest precautions.”", true, new RelativeSizeSpan(1f), new CenterSpan(), new ImageSpan(getResources().getDrawable(R.drawable.ic_launcher), ImageSpan.ALIGN_BASELINE));
addDocumentView(ab, DocumentView.FORMATTED_TEXT);
}
Aggregations