Reputation: 71
What value should I put inside the parameter to make the marquee repeat limit to forever?
holder.hTextTitle.setEllipsize(TruncateAt.MARQUEE);
holder.hTextTitle.setMarqueeRepeatLimit();
Upvotes: 2
Views: 8444
Reputation: 404
android:marqueeRepeatLimit="marquee_forever"
Also, do look at this post.
Upvotes: 0
Reputation: 1951
To set infinite marquee programmatically use:
TextView txt = new TextView(this);
txt.setText("This is the infinite marquee");
txt.setEllipsize(TextUtils.TruncateAt.MARQUEE);
txt.setSingleLine(true);
txt.setMarqueeRepeatLimit(-1);
txt.setSelected(true);
Upvotes: 8
Reputation: 3599
TextView tv = (TextView) this.findViewById(R.id.textView1);
tv.setEllipsize(TruncateAt.MARQUEE);
tv.setText("Your text…");
tv.setSelected(true);
tv.setSingleLine(true);
Upvotes: 0
Reputation: 258
TextView textView=(TextView)findViewById(R.id.text_test);
textView .setEllipsize(TextUtils.TruncateAt.MARQUEE);
textView .setSingleLine(true);
textView .setMarqueeRepeatLimit(-1);
textView.setFocusableInTouchMode(true);
textView.setFocusable(true);
Upvotes: 2