Sunday, November 3, 2013

Action bar compatible library configuration

Android is providing compat libraries for Android level grater than 7 i.e Andorid Os version 2.1 and above. In this post I would like to discuss the configuration of Actionbar Compat project.

  • Download V7 library project from here
  • Import the downloaded project into the current work space.
  • Build the project.
  • Create  New Android Project.
  • Add the imported project as the supporting project.
Properties of the new working project

As shown above, add the  supporting project as library for the current working project.
Now you are ready with the configuration. 

Post configuration:
Some points to be noted for using the App compat action bar are:
  • The Class which wish to use AppCompat features must extend with ActionBarActivity.
  • In the res - > values --> styles.xml, Modify the AppBaseTheme to
    • <style name="AppBaseTheme" parent="Theme.AppCompat.Light"> for light theme.

No comments:

Post a Comment