The following is the first few sections of a chapter from The Busy Coder's Guide to Android Development, plus headings for the remaining major sections, to give you an idea about the content of the chapter.


Tutorial #3 - Manifest Changes

As we build EmPubLite, we will need to make a number of changes to our project’s manifest. In this tutorial, we will take care of a couple of these changes, to show you how to manipulate the AndroidManifest.xml file. Future tutorials will make yet more changes.

Android Studio users will also get their first chance to work with the build.gradle file.

This is a continuation of the work we did in the previous tutorial.

You can find the results of the previous tutorial and the results of this tutorial in the book’s GitHub repository.

Some Notes About Relative Paths

In these tutorials, you will see references to relative paths, like AndroidManifest.xml, res/layout/, and so on.

Android Studio users should interpret these paths as being relative to the app/src/main/ directory within the project, except as otherwise noted. So, for example, Step #1 below will ask you to open AndroidManifest.xml — that file can be found in app/src/main/AndroidManifest.xml from the project root.

Step #1: Supporting Screens

Our application will restrict its supported screen sizes. Tablets make for ideal ebook readers. Phones can also be used, but the smaller the phone, the more difficult it will be to come up with a UI that will let the user do everything that is needed, yet still have room for more than a sentence or two of the book at a time.

We will get into screen size strategies and their details later in this book. For the moment, though, we will add a <supports-screens> element to keep our application off “small” screen devices (under 3” diagonal size).

Android Studio users can double-click on AndroidManifest.xml in the project explorer.

As a child of the root <manifest> element, add a <supports-screens> element as follows:


<supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="false"
    android:xlargeScreens="true"/>

Step #2: Blocking Backups

The preview of this section is [REDACTED].

Step #3: Ignoring Lint

The preview of this section was eaten by a grue.

In Our Next Episode…

The preview of this section was whisked away by a shark-infested tornado.