TextView txt = new TextView(this);
txt.setText(“This is moving text”);
txt.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 16);
txt.setTextColor(Color.rgb(187, 88, 15));
txt.setPadding(10, 10, 0, 0);
txt.setEllipsize(TruncateAt.MARQUEE);
txt.setSingleLine();
txt.setMarqueeRepeatLimit(10);
txt.setFocusable(true);
txt.setHorizontallyScrolling(true);
txt.setFocusableInTouchMode(true);
txt.requestFocus();
txt.setTypeface(Typeface.SERIF,Typeface.BOLD);
我试图为 textview 创建移动文本,但它不会移动。我尝试使用 setMarqueeRepeatLimit 。怎么做?