1

TextViewでTextSwitcherアニメーションを使用できますか?(文字を変更するときに変更したい)
または
コード(のようにTextView : txtView.setTextSize();)でテキストサイズを変更し、TextColorも変更できますか?

コードはシンプルです

4

1 に答える 1

0

コードの上部に 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);
                }
            }
于 2012-12-31T13:52:06.877 に答える