Join David Gassner for an in-depth discussion in this video Enabling the action bar on all versions of Android, part of Building a Note-Taking App for Android (2013).
I'm about half way through the process of implementing the action bar for older…versions of Android. This is the state of the application right…now. Showing the action bar on Jelly Bean.…But only the app name on Gingerbread. I'll go back to Eclipse where I've…imported and linked the action bar short lock library.…And now I'm ready to start making some code changes.…I'll start in the main activity class. ActionbarSherlock does its work by…providing alternative versions of many of the common Android classes.…
For example, if you want to use Actionbarsherlock on a list activitiy.…Instead, use a class called Sherlock ListActivity.…I'll get rid of this super class declaration, and I'll type sher and press…Control + Space, and there's a list of all of the alternative classes.…And I'll choose this one, SherlockListActivity.…That adds an import for that class, and I no longer need the import for…ListActivity. So I'll delete it.…
You could also use the Organize Imports feature from the Source menu.…I'll save my changes, and then go and look at my Problems View.…
Like its companions, this course will take you through building a complete mobile app from scratch; but this installment uses the Android SDK and Java to get the job done. Author David Gassner shows you how to install the SDK and the Android Developer Toolkit, create a project, save data on a device, build and control screen layouts, and create action bars and icons that control navigation.
These three related courses will use the same assets to develop the same app. (See Building a Note-Taking App for iOS and Building a Note-Taking App for Windows Phone 8 and Windows Store for more information.) Compare and contrast the different steps and discover the similarities and differences!
- Previewing the note-taking app
- Creating virtual devices for testing
- Unique concepts in Android
- Creating the Eclipse project
- Using local data storage
- Adding and retrieving data with the Shared Preferences API
- Creating screen designs
- Creating and editing notes
- Supporting older versions of Android with ActionBarSherlock