Skip to content

Commit

Permalink
Clean up AndroidWearMap sample and update to Google Play Services 7.8.
Browse files Browse the repository at this point in the history
Use MapFragment instead of SupportMapFragment and add a
.gitingore file.

Change-Id: Id89502cb8fdaa1898e30435e8f09ab6cdd4e986a
  • Loading branch information
jfschmakeit committed Sep 1, 2015
1 parent 465f7c8 commit e602f8f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build/
.idea
.gradle
*.iml
local.properties
.DS_Store
8 changes: 4 additions & 4 deletions AndroidWearMap/Wearable/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ apply plugin: 'com.android.application'


android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
applicationId "com.example.androidwearmap"
minSdkVersion 21
targetSdkVersion 21
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
Expand All @@ -45,5 +45,5 @@ dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

compile 'com.google.android.support:wearable:1.1.0'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.google.android.gms:play-services:7.8.0'
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.wearable.view.DismissOverlayView;
import android.view.View;
import android.view.WindowInsets;
Expand All @@ -33,7 +33,7 @@
/**
* Sample that shows how to set up a basic Google Map on Android Wear.
*/
public class MainActivity extends FragmentActivity implements OnMapReadyCallback,
public class MainActivity extends Activity implements OnMapReadyCallback,
GoogleMap.OnMapLongClickListener {

private static final LatLng SYDNEY = new LatLng(-33.85704, 151.21522);
Expand Down Expand Up @@ -90,9 +90,8 @@ public WindowInsets onApplyWindowInsets(View v, WindowInsets insets) {
mDismissOverlay.showIntroIfNecessary();

// Obtain the MapFragment and set the async listener to be notified when the map is ready.
SupportMapFragment mapFragment =
(SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
MapFragment mapFragment =
(MapFragment) getFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.SupportMapFragment"/>
android:name="com.google.android.gms.maps.MapFragment"/>

</FrameLayout>

Expand Down

0 comments on commit e602f8f

Please sign in to comment.