TextViewでTextSwitcherアニメーションを使用できますか?(文字を変更するときに変更したい)
または
コード(のようにTextView : txtView.setTextSize();
)でテキストサイズを変更し、TextColorも変更できますか?
コードはシンプルです
コードの上部に textswitcher ビューを配置した後:
TextSwitcher questionTextSwitcher = (TextSwitcher) findViewById(R.id.textSwitcher);
questionTextSwitcher.setFactory(new MyTextSwitcherFactory());
ここで、テキストビューを操作できます:
private class MyTextSwitcherFactory implements ViewSwitcher.ViewFactory {
public View makeView() {
TextView textView = new TextView(CurrentClass.this);
textView.setGravity(Gravity);
textView.setTextSize(size);
textView.setTextColor(Color);
}
}