I'm trying to ellipsize the title of an activity, could anyone please let me know how to do it?
setTitle("My Title");
//when the text of the title gets too long, how can I use setEllipsize() here? how can I get the view Id of that title?
I'm trying to ellipsize the title of an activity, could anyone please let me know how to do it?
setTitle("My Title");
//when the text of the title gets too long, how can I use setEllipsize() here? how can I get the view Id of that title?
Try this: http://it-ride.blogspot.pt/2010/07/android-title-marquee.html Some of the people there say it works, some others say it doesn't.
The code is based on this web link http://it-ride.blogspot.pt/2010/07/android-title-marquee.html
// make the title scroll!
// find the title TextView
TextView title = (TextView) findViewById(android.R.id.title);
// set the ellipsize mode to MARQUEE and make it scroll only once
title.setEllipsize(TruncateAt.MARQUEE);
title.setMarqueeRepeatLimit(1);
// in order to start strolling, it has to be focusable and focused
title.setFocusable(true);
title.setFocusableInTouchMode(true);
title.requestFocus();