Code Monkey home page Code Monkey logo

Comments (5)

blurkidi avatar blurkidi commented on August 19, 2024

It is nice to know that people read the wiki pages 👍 . What I suggest is that you create a AccentActionBarActivity that extends ActionBarActivity. Apply the configuration as explained in the guide you mentioned and then let all your activities extend AccentActionBarActivity.

You can just copy the AccentActivity implementation and make it extend ActionBarActivity insted of Activity:
https://github.com/negusoft/holoaccent/blob/master/HoloAccent/src/com/negusoft/holoaccent/activity/AccentActivity.java

Let me know how it went.

from holoaccent.

trietbui85 avatar trietbui85 commented on August 19, 2024

Yeah, I see.
However, because to use ActionBarActivity, in AndroidManifest.xml, its theme must extend Theme.AppCompat while to use HoloAccent, activity's theme must be Theme.HoloAccent.

Of course I can cheat to fix it by change <style name="Theme.HoloAccent" parent="android:Theme.Holo"> to make its parent is Theme.HoloAccent (in ha__themes.xml) but it seems a hack instead of good solution

Do you have any idea?

from holoaccent.

blurkidi avatar blurkidi commented on August 19, 2024

Correct me if I am wrong, but I think that Theme.AppCompat is only necessary for preICS devices. HoloAccent is minSdkVersion="14" so I think that it should work with the solution we discussed. Did you try it? what is the result?

from holoaccent.

blurkidi avatar blurkidi commented on August 19, 2024

I finally tried it myself and indeed, ActionBarActivity requires a "Theme.AppCompat" theme. But I implemented the sample app with FragmentActivity from the support library and it works. Plus, since HoloAccent is available for Android 4.0+ devices, you won't need the ActionBar backwards supports.

So you can try replacing ActionBarActivity by FragmentActivity and use the "normal" actionbar in stead of the "support" actionbar. Please let me know about the result.

from holoaccent.

trietbui85 avatar trietbui85 commented on August 19, 2024

Thank you @blurkidi .

You're right. From Android 4.0, we can use native ActionBar instead ActionBarSherlock or ActionBarCompat. So, because your lib targets Android 4.0+, so it's safely to use native ActionBar.

from holoaccent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.