diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 7ac24c7..5d6f65c 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -9,6 +9,7 @@
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index ab07147..a936b1f 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -4,6 +4,7 @@
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
index 3af3ccf..51ba239 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -20,11 +20,12 @@ android {
}
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
+ compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.google.android.gms:play-services-maps:9.6.1'
testCompile 'junit:junit:4.12'
+ compile project(':lib')
}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c6aa217..096a589 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -1,6 +1,7 @@
+
+ android:value="AIzaSyDPH_u2j72MW33nwJ120HA_2xV20V5GZuI" />
+
diff --git a/app/src/main/java/test/jinesh/themedgooglemap/MainActivity.java b/app/src/main/java/test/jinesh/themedgooglemap/MainActivity.java
index 8618192..ff8867d 100644
--- a/app/src/main/java/test/jinesh/themedgooglemap/MainActivity.java
+++ b/app/src/main/java/test/jinesh/themedgooglemap/MainActivity.java
@@ -4,8 +4,10 @@
import android.support.v7.app.AppCompatActivity;
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 test.jinesh.lib.GoogleMapStyler;
public class MainActivity extends AppCompatActivity {
@@ -13,7 +15,7 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
- ((MapFragment) getFragmentManager().findFragmentById(
+ ((SupportMapFragment) getSupportFragmentManager().findFragmentById(
R.id.vM_apnrm_map)).getMapAsync(new OnMapReadyCallback() {
@Override
public void onMapReady(GoogleMap googleMap) {
@@ -41,6 +43,7 @@ public void onMapReady(GoogleMap googleMap) {
.setAllWaterTextStrokeAlpha(-20)
.build();
boolean success = googleMap.setMapStyle(googleMapStyler.getMapStyleOptions());
+ googleMap.setBuildingsEnabled(true);
}
});
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index a279f63..f77ea90 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -7,7 +7,7 @@
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 2e11174..4d5a6ae 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,7 +1,7 @@
- #3F51B5
- #303F9F
+ #304ffe
+ #304ffe
#FF4081
#b71c1c
@@ -34,4 +34,9 @@
#d59563
#17263c
#515c6d
+
+ #46BCEC
+ #ECECEC
+ #D9D9D9
+ #616161
diff --git a/build.gradle b/build.gradle
index a3330d4..ce2fce1 100644
--- a/build.gradle
+++ b/build.gradle
@@ -11,10 +11,12 @@ buildscript {
// in the individual module build.gradle files
}
}
-
+repositories {
+ mavenCentral()
+}
allprojects {
repositories {
- jcenter()
+ mavenCentral()
}
}
diff --git a/lib/.gitignore b/lib/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/lib/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/lib/build.gradle b/lib/build.gradle
new file mode 100644
index 0000000..27655d5
--- /dev/null
+++ b/lib/build.gradle
@@ -0,0 +1,32 @@
+apply plugin: 'com.android.library'
+
+android {
+ compileSdkVersion 25
+ buildToolsVersion "25.0.2"
+
+ defaultConfig {
+ minSdkVersion 16
+ targetSdkVersion 25
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ compile fileTree(dir: 'libs', include: ['*.jar'])
+ androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
+ exclude group: 'com.android.support', module: 'support-annotations'
+ })
+ compile 'com.android.support:appcompat-v7:25.1.0'
+ compile 'com.google.android.gms:play-services-maps:9.6.1'
+ testCompile 'junit:junit:4.12'
+}
diff --git a/lib/proguard-rules.pro b/lib/proguard-rules.pro
new file mode 100644
index 0000000..304cc0d
--- /dev/null
+++ b/lib/proguard-rules.pro
@@ -0,0 +1,17 @@
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in C:\Users\jinesh\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
diff --git a/lib/src/androidTest/java/test/jinesh/lib/ExampleInstrumentedTest.java b/lib/src/androidTest/java/test/jinesh/lib/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..9e6e8e4
--- /dev/null
+++ b/lib/src/androidTest/java/test/jinesh/lib/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package test.jinesh.lib;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumentation test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() throws Exception {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("test.jinesh.lib.test", appContext.getPackageName());
+ }
+}
diff --git a/lib/src/main/AndroidManifest.xml b/lib/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..36349e4
--- /dev/null
+++ b/lib/src/main/AndroidManifest.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
diff --git a/app/src/main/java/test/jinesh/themedgooglemap/GoogleMapStyler.java b/lib/src/main/java/test/jinesh/lib/GoogleMapStyler.java
similarity index 99%
rename from app/src/main/java/test/jinesh/themedgooglemap/GoogleMapStyler.java
rename to lib/src/main/java/test/jinesh/lib/GoogleMapStyler.java
index 68e3629..83bda17 100644
--- a/app/src/main/java/test/jinesh/themedgooglemap/GoogleMapStyler.java
+++ b/lib/src/main/java/test/jinesh/lib/GoogleMapStyler.java
@@ -1,4 +1,4 @@
-package test.jinesh.themedgooglemap;
+package test.jinesh.lib;
import android.content.Context;
import android.support.annotation.ColorInt;
@@ -125,7 +125,7 @@ private void setMapStyleOptions(MapStyleOptions mapStyleOptions) {
/**
* Builder class to generate the map style
*/
- static class Builder {
+ public static class Builder {
/**
* Map style to be applied
*/
diff --git a/lib/src/main/res/values/strings.xml b/lib/src/main/res/values/strings.xml
new file mode 100644
index 0000000..e78d2f7
--- /dev/null
+++ b/lib/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ Lib
+
diff --git a/lib/src/test/java/test/jinesh/lib/ExampleUnitTest.java b/lib/src/test/java/test/jinesh/lib/ExampleUnitTest.java
new file mode 100644
index 0000000..2886160
--- /dev/null
+++ b/lib/src/test/java/test/jinesh/lib/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package test.jinesh.lib;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() throws Exception {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
index e7b4def..3cbe249 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1 @@
-include ':app'
+include ':app', ':lib'