Source code to omnibus edition of _The Busy Coder's Guide to Android Development_
Java HTML JavaScript CSS Makefile Groovy
Latest commit ab35d28 Jan 20, 2017 @commonsguy new sample apps
Permalink
Failed to load latest commit information.
ACRA/Simple updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Accessibility/FontScale updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
ActionBar updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
ActionMode updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Activities updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
AlarmManager updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Animation updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
AppCompat updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
AppShortcuts/WeakBrowser updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
AppWidget updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Assist updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Backup/BackupClient removed EventBus Jan 7, 2017
Bandwidth/TrafficMonitor updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Basic updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
BasicMaterial updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Binding updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Bitmaps/InSampleSize updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
CPU-Java updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Calendar/Query updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Camera updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
ConfigChange updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Contacts updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Containers updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
ContentProvider updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
DataBinding updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Database updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
DesignSupport updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
DeviceAdmin updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Diagnostics updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Dialogs updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Documents updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
DragDrop updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Drawable updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
DynCode/ListLoader updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
EmPubLite-AndroidStudio updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
EventBus updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Files/FilesEditor added runtime permissions Jan 7, 2017
Focus/Sampler updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Fonts/FontSampler updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Fragments updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Gradle updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
GridLayout/Sampler updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
HTTP updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
InputMethod updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Intents updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Internet updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Introspection updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
JNI/WeakBench updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
JVM/InterpreterService updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Jank updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Java8/VideoLambda updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
JobScheduler updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
KBMouse updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
LargeScreen updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Leaks updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Leanback/VideoBrowse updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Loaders/ConstantsLoader updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Location updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Manifest updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
MapsV2 updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Media updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
MediaProjection updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
MediaRouter updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
MiscSecurity/SigDump updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
MiscUI/DelayedTimeout updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
MultiWindow updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
NFC updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
NavDrawer updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Notifications updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
PDF new samples Jan 7, 2017
Parcelable/Marshall updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Percent/Comparison updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Permissions updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Phone/Dialer updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Prefs updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Presentation updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Printing/PrintManager updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Progress updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
RecyclerView updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
RecyclerViewPager new samples Jan 7, 2017
RemoteViews updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
RestrictedProfiles updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
RichText/Search updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Rx new sample apps Jan 7, 2017
SMS updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Search/Lorem updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Selection updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Sensor/Monitor updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Service updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Skeleton/Now updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Styles/NowStyled updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
SystemEvents updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
SystemServices updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Tapjacking/RelativeSecure updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Tasks updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Testing updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Threads updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Toolbar updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
UnitTest updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
ViewPager updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
Views updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
WebKit new sample apps Jan 20, 2017
WebServer updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
WidgetCatalog updated all projects to Gradle 2.14.1 and Android Plugin for Gradle 2… Jan 7, 2017
external updated Gradle files for AS 1.0/Gradle for Android 1.0 Dec 9, 2014
LICENSE initial import Mar 12, 2012
README.markdown updated for more projects Nov 13, 2016

README.markdown

https://commonsware.com/Android/previews/defining-and-using-styles

About the Book

The Busy Coder's Guide to Android Development is a book covering Android application development, from basics through advanced capabilities. It is updated several times a year and is available through the Warescription program. Subscribers also have access to office hours chats and other benefits.

This repository contains the source code for the hundreds of sample apps profiled in the book. These samples are updated as the book is, with git tags applied to tie sample code versions to book versions.

The book, and the samples, were written by Mark Murphy. You may also have run into him through Stack Overflow:

profile for CommonsWare at Stack Overflow, Q&A for professional and enthusiast programmers

About the Code

All of the source code in this archive is licensed under the Apache 2.0 license except as noted.

The names of the top-level directories roughly correspond to a shortened form of the chapter titles. Since chapter numbers change with every release, and since some samples are used by multiple chapters, I am loathe to put chapter numbers in the actual directory names.

Using in Android Studio

All of the projects should have a build.gradle file suitable for importing the project into Android Studio. Note, though, that you may need to adjust the compileSdkVersion in build.gradle if it requests an SDK that you have not downloaded and do not wish to download. Similarly, you may need to adjust the buildToolsVersion value to refer to a version of the build tools that you have downloaded from the SDK Manager.

The samples also have stub Gradle wrapper files, enough to allow for easy import into Android Studio. However, always check the gradle-wrapper.properties file before importing anything into Android Studio, as there is always the chance that somebody has published material linking you to a hacked Gradle installation.

Using with Command-Line Gradle

Right now, you will need your own local installation of Gradle 2.1 in order to build the projects from the command line, as the repository does not contain gradlew or its corresponding JAR for security reasons.

List of Samples