Note that there are some explanatory texts on larger screens.

plurals
  1. POMake ActionBar overlay using ActionBarSherlock
    primarykey
    data
    text
    <p>The last few days I've been doing great stuff in development, but I've seem to have hit a wall on something probably stupid simple. It's annoying. I was hoping I could get some help.</p> <p><strong>What I'm trying to do</strong> </p> <p>I'm trying to create the awesome transparent ActionBar animation effect from Google Music (as described by Cyril Mottier <a href="http://cyrilmottier.com/2013/05/24/pushing-the-actionbar-to-the-next-level/" rel="nofollow">here</a>)</p> <p><strong>The problem</strong></p> <p>I can't even get the actionbar to go into overlay / transparent mode.</p> <p><strong>My set-up</strong></p> <p>I've got a library-oriented set-up in Eclipse. I've got a library project (let's call it master) that contains all the actual code and activities. Then I've got a project, that just plugs into the master library (let's call it slave). Lastly there's some open source support libraries that master uses (among others is ActionBarSherlock). </p> <p>The activity I'm trying to apply this effect to is in the master library. It is declared in slave's manifest as <code>com.example.master.DetailActivity</code>, and that works like a charm. </p> <p>Also: The theme for the activity may come from several places. Either it's set by slave's manifest, or by master at runtime. Themes may come from the master OR the slave project.</p> <p><strong>What I've tried</strong></p> <p>Feels like everything. I've started out by creating a custom theme based on Cyril's article. I made sure that for every item I've had a version with and without the <code>android:</code> prefix as per <a href="http://actionbarsherlock.com/theming.html" rel="nofollow">Jake Wharton's instructions</a>. </p> <p>I've also tried setting it at runtime using <code>requestWindowFeature(Window.FEATURE_ACTION_BAR_OVERLAY);</code></p> <p><strong>What I've got</strong></p> <p>Nothing. The theme applied succesfully (I can see the actionbar's colors change appropriately), but it NEVER goes into overlay mode, nor does it become transparent.</p> <p>Help would be greatly appreciated, and would probably be helpful to other's trying this effect.</p> <p>EDIT:</p> <p>Here are my themes and styles. Codes are kinda messy because I've been experimenting with them to see where I was going wrong. <code>AppTheme</code> and <code>Theme.TranslucentActionBar.ActionBar.Overlay</code> both won't work. /res/values/</p> <ul> <li><a href="http://pastebin.com/fNBq5p1J" rel="nofollow">styles.xml</a></li> <li><a href="http://pastebin.com/BsetbcQJ" rel="nofollow">themes.xml</a></li> </ul> <p>/res/values-v11/</p> <ul> <li><a href="http://pastebin.com/8JCkrUdj" rel="nofollow">styles.xml</a></li> <li><a href="http://pastebin.com/XbLRHwUG" rel="nofollow">themes.xml</a></li> </ul> <p>I'm testing on a Nexus 4 with 4.2.2 installed as well as a 2.3.3 emulator.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload