I load the title in an Activity dynamically; whenever the title is too long, I would like it to scroll so the whole title can be read.
I've tried in a custom XML file and requestFeature,
android:singleLine="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit ="marquee_forever"
android:scrollHorizontally="true"
android:focusable="true"
android:focusableInTouchMode="true"
The other method I've tried
TextView textView = (TextView) findViewById(android.R.id.title);
textView.setSelected(true);
textView.setEllipsize(TruncateAt.MARQUEE);
textView.setMarqueeRepeatLimit(1);
textView.setFocusable(true);
textView.setFocusableInTouchMode(true);
textView.requestFocus();
textView.setSingleLine(true);
gave me nullpointers at ellipsize(). I'm at a loss, really. How can I achieve this effect?