staticLayout로 띄워져 있는 text를 image로 바꾸고 싶은데요..
소스코드를 보면...
private void createLayouts(int widthItems, int widthLabel) {
if (itemsLayout == null || itemsLayout.getWidth() > widthItems) {
//Log.i("itemsLayout.getWidth()"," : " + itemsLayout.getWidth());
Log.i("widthItems", " : "+widthItems);
itemsLayout = new StaticLayout(buildText(isScrollingPerformed), itemsPaint, widthItems,
widthLabel > 0 ? Layout.Alignment.ALIGN_OPPOSITE : Layout.Alignment.ALIGN_CENTER,
1, ADDITIONAL_ITEM_HEIGHT, false); //이런식으로 buildText()로 부른 String값을 onDraw를 통해 뿌려주고 있습니다..
}
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (itemsLayout == null) {
if (itemsWidth == 0) {
calculateLayoutWidth(getWidth(), MeasureSpec.EXACTLY);
} else {
createLayouts(itemsWidth, labelWidth);
}
}
if (itemsWidth > 0) {
canvas.save();
// Skip padding space and hide a part of top and bottom items
canvas.translate(PADDING, -ITEM_OFFSET);
drawValue(canvas);
drawItems(canvas);
canvas.restore();
}
drawCenterRect(canvas);
drawShadows(canvas);
}
여기서.. Image를 띄우기 위해 staticLayout을 대체할만한 것이 있을까요??