List of usage examples for android.text BoringLayout BoringLayout
public BoringLayout(CharSequence source, TextPaint paint, int outerWidth, Alignment align, float spacingMult, float spacingAdd, BoringLayout.Metrics metrics, boolean includePad, TextUtils.TruncateAt ellipsize, int ellipsizedWidth)
From source file:com.bitflake.counter.HorizontalPicker.java
/** * Sets window to choose from/* ww w . java2 s . c om*/ * @param values New window to choose from */ public void setValues(CharSequence[] values) { if (this.values != values) { this.values = values; if (this.values != null) { layouts = new BoringLayout[this.values.length]; for (int i = 0; i < layouts.length; i++) { layouts[i] = new BoringLayout(this.values[i], textPaint, itemWidth, Layout.Alignment.ALIGN_CENTER, 1f, 1f, boringMetrics, false, ellipsize, itemWidth); } } else { layouts = new BoringLayout[0]; } // start marque only if has already been measured if (getWidth() > 0) { startMarqueeIfNeeded(); } requestLayout(); invalidate(); } }
From source file:kr.selfcontrol.selflocklauncher.picker.HorizontalPicker.java
/** * Sets values to choose from//from w ww. j a va 2 s .c o m * @param values New values to choose from */ public void setValues(CharSequence[] values) { if (mValues != values) { mValues = values; if (mValues != null) { mLayouts = new BoringLayout[mValues.length]; for (int i = 0; i < mLayouts.length; i++) { mLayouts[i] = new BoringLayout(mValues[i], mTextPaint, mItemWidth, Layout.Alignment.ALIGN_CENTER, 1f, 1f, mBoringMetrics, false, mEllipsize, mItemWidth); } } else { mLayouts = new BoringLayout[0]; } // start marque only if has already been measured if (getWidth() > 0) { startMarqueeIfNeeded(); } requestLayout(); invalidate(); } }