maandag 16 december 2013

Styling the Action Bar

The Android action bar is the most prominent UI element of most Android apps. Using the default style doesn't make sense an you will definitely want to style it to make your app look unique. Fortunately there's an easy to use online tool that makes it easy for you: the Android Action Bar Style Generator. This free webapp lets you type in the colors you've chosen to use in your app and it will generate all the necessary files you need for your app.

Note: don't use caps or spaces in the syle name. It is used to name all the assets that are being generated. Use only characters that are allowed in Android resources!

Once you're done download the generated ZIP file and copy it's content to into your app. You'll find different drawables and XML files in the zip. They all go to the res folder of your app.

Once you have copied them to your app project you simply need to enable the created theme. The name of the theme is what you gave it in the webapp. You'll find it in the values folder from the generated styles file:

To enable the generated style you must add it into your app's manifest. Simply set the app style to point to the generated style:

0 reacties:

Een reactie plaatsen