List of usage examples for android.text BidiFormatter unicodeWrap
public CharSequence unicodeWrap(CharSequence str)
From source file:com.androidinspain.deskclock.timer.TimerSetupView.java
public TimerSetupView(Context context, AttributeSet attrs) { super(context, attrs); final BidiFormatter bf = BidiFormatter.getInstance(false /* rtlContext */); final String hoursLabel = bf.unicodeWrap(context.getString(R.string.hours_label)); final String minutesLabel = bf.unicodeWrap(context.getString(R.string.minutes_label)); final String secondsLabel = bf.unicodeWrap(context.getString(R.string.seconds_label)); // Create a formatted template for "00h 00m 00s". mTimeTemplate = TextUtils.expandTemplate("^1^4 ^2^5 ^3^6", bf.unicodeWrap("^1"), bf.unicodeWrap("^2"), bf.unicodeWrap("^3"), FormattedTextUtils.formatText(hoursLabel, new RelativeSizeSpan(0.5f)), FormattedTextUtils.formatText(minutesLabel, new RelativeSizeSpan(0.5f)), FormattedTextUtils.formatText(secondsLabel, new RelativeSizeSpan(0.5f))); LayoutInflater.from(context).inflate(R.layout.timer_setup_container, this); }