Skip to content

Most visited

Recently visited

navigation
XYZTouristAttractions / Shared / src / com.example.android.xyztouristattractions.common /

Attraction.java

1
/*
2
 * Copyright 2015 Google Inc. All rights reserved.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *      http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
 
17
package com.example.android.xyztouristattractions.common;
18
 
19
import android.graphics.Bitmap;
20
import android.net.Uri;
21
 
22
import com.google.android.gms.maps.model.LatLng;
23
 
24
/**
25
 * A simple shared tourist attraction class to easily pass data around. Used
26
 * in both the mobile app and wearable app.
27
 */
28
public class Attraction {
29
    public String name;
30
    public String description;
31
    public String longDescription;
32
    public Uri imageUrl;
33
    public Uri secondaryImageUrl;
34
    public LatLng location;
35
    public String city;
36
 
37
    public Bitmap image;
38
    public Bitmap secondaryImage;
39
    public String distance;
40
 
41
    public Attraction() {}
42
 
43
    public Attraction(String name, String description, String longDescription, Uri imageUrl,
44
                      Uri secondaryImageUrl, LatLng location, String city) {
45
        this.name = name;
46
        this.description = description;
47
        this.longDescription = longDescription;
48
        this.imageUrl = imageUrl;
49
        this.secondaryImageUrl = secondaryImageUrl;
50
        this.location = location;
51
        this.city = city;
52
    }
53
}
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a one-minute survey?
Help us improve Android tools and documentation.