1

I'm trying to implement sherlock actionbar but i can't set the right theme in the manifest because it simply doesn't exists. the tutorial says to put android:theme="@style/Theme.Sherlock" but i don't have this choice, why? i correctly added sherlock library to my project.

user1345108
  • 230
  • 2
  • 15
  • setting it via code worked, but in the end i preferred importing the library directly into my project and finally iv'been able to set the theme from the manifest. – user1345108 Jun 28 '12 at 15:04

2 Answers2

1

Follow the tutorial on ActionBarSherlock's website, ensure your adding the project as an Android library and do a full clean + build. This should 'just work'.

EDIT #1 Try adding this to your themes.xml file in /values

<style name="Theme.MyCustomTheme" parent="@style/Theme.Sherlock"></style>
  • i followed the video tutorial on its website, created an android project from existing source (the "library" path folder) the imported it in my already existing project by going into properties>>Android>>Add what am i doing wrong? in the manifests it sees my styles but not the ones from sherlock library, maybe i have to remove mine (i really hope not)? – user1345108 Jun 26 '12 at 15:24
  • No, you can definitely keep your styles. Eclipse should merge both project resources together for use in your main application. Have you updated to the latest version of ADT? See edit in post. – D.T. Atkinson Jun 26 '12 at 15:27
0

http://actionbarsherlock.com/usage.html

as per link

: Delete the JAR that you created. Add ActionBarSherlock to your app as an Android library project. While the ActionBarSherlock documentation (see "Including In Your Project") only cites Eclipse and Maven for how to do this,

as per link

do in java code

@Override
public void onCreate(Bundle savedInstanceState) {
   if (Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH){
        this.setTheme(com.actionbarsherlock.R.style.Theme_Sherlock);
   }
   super.onCreate(savedInstanceState);
   ... // MORE CODE ....
}
Community
  • 1
  • 1
Dheeresh Singh
  • 15,643
  • 3
  • 38
  • 36