Subtitle marquee and home as up

569 views
Skip to first unread message

Fabien

unread,
Apr 26, 2012, 2:31:42 AM4/26/12
to actionba...@googlegroups.com
Hello,

I'm migrating from 3.5 to 4.0.2

1) In 3.5, actionbar subtitle has a marquee mode if the subtitle is too long.

In 4.0.2, I tried this in action bar style :
<item name="subtitleTextStyle">@style/Widget.Styled.ActionBar.SubtitleTextStyle</item>
<item name="android:subtitleTextStyle">@style/Widget.Styled.ActionBar.SubtitleTextStyle</item>

<style name="Widget.Styled.ActionBar.SubtitleTextStyle"
parent="android:style/TextAppearance.Holo.Widget.ActionBar.Subtitle">
<item name="android:ellipsize">marquee</item>
</style>

but subtitle doesn't move.

2) Another question, I want to remove the action bar logo action "home
as up", I tried :
getSupportActionBar().setDisplayHomeAsUpEnabled(false);
the logo icon is already clickable (i was the same in 3.5).

Thank you for your help and thank you jake for your work !

Fabien

Jake Wharton

unread,
Apr 26, 2012, 2:50:50 AM4/26/12
to actionba...@googlegroups.com
You cannot marquee the title or subtitle with ABS 4.x nor the native action bar on Android.

The home button is disabled by default if you target API 14+. You can enable or disable programmatically by calling setHomeButtonEnabled(true/false);.

---
Jake Wharton
http://about.me/jakewharton

Fabien

unread,
Apr 26, 2012, 4:02:42 PM4/26/12
to actionba...@googlegroups.com
Thank you for the answer !

I need to display the application logo in the action bar but when I
touch it, I don't want a blue square behind it. Is it possible to
disable the onOver ?

Jake Wharton

unread,
Apr 26, 2012, 4:04:03 PM4/26/12
to actionba...@googlegroups.com
target api 14 or call setHomeButtonDisabled

Fabien

unread,
Apr 26, 2012, 4:25:04 PM4/26/12
to actionba...@googlegroups.com
Sorry, I thought it will remove the icon ;).
Reply all
Reply to author
Forward
0 new messages