Android Programming The Big Nerd Ranch Guide, 3rd Edition
Color evaluation 617 Listing 32.11 Pulling out sunset colors (SunsetFragment.java) public class SunsetFragment extends Fragment ...
Chapter 32 Property Animation 618 that tells ObjectAnimator what value is, say, a quarter of the way between a start value and ...
Playing Animators Together 619 For more sophisticated animation choreography, this will not do the trick. For example, to comple ...
Chapter 32 Property Animation 620 For the More Curious: Other Animation APIs While property animation is the most broadly usefu ...
621 33. Locations and Play Services In this chapter, you will start writing a new app called Locatr that performs a Flickr geose ...
Chapter 33 Locations and Play Services 622 Locations and Libraries To see why, let’s talk a bit about what your average Android ...
Creating Locatr 623 Creating Locatr Now to get started. In Android Studio, create a new project called Locatr. Create an empty a ...
Chapter 33 Locations and Play Services 624 Your AVD emulator also needs to have a target OS version that supports the Google AP ...
Mock location data 625 The easiest way to do that is to open the browser app in your emulator and type in the URL (Figure 33.4). ...
Chapter 33 Locations and Play Services 626 MockWalker will trigger a mock walk for you via a service that posts mock location d ...
Building Out Locatr 627 Building Out Locatr Time to create your interface. First, add a string for your search button in res/val ...
Chapter 33 Locations and Play Services 628 Now create a Fragment subclass called LocatrFragment that hooks up your layout and p ...
Setting Up Google Play Services 629 Now hook it up in LocatrActivity. Delete everything inside this class and replace it, like s ...
Chapter 33 Locations and Play Services 630 Next, you need to verify that Play Services is available. Since the working parts li ...
Using Google Play Services 631 Listing 33.7 Adding permissions (AndroidManifest.xml) <manifest xmlns:android="http://schemas ...
Chapter 33 Locations and Play Services 632 Once you do that, you need to connect to the client. Google recommends always connec ...
Flickr Geosearch 633 Listing 33.11 Listening for connection events (LocatrFragment.java) @Override public void onCreate(Bundle ...
Chapter 33 Locations and Play Services 634 Listing 33.13 New searchPhotos(Location) (FlickrFetchr.java) public List searchPhot ...
Getting a Location Fix 635 When you first create a LocationRequest, it will be configured for accuracy within a city block, with ...
Chapter 33 Locations and Play Services 636 Run your app and press the search button. Sadly, your dramatic red error indicator w ...
«
27
28
29
30
31
32
33
34
35
36
»
Free download pdf