From b28a0cce11d613a6dc9f06146124e847efa3d760 Mon Sep 17 00:00:00 2001 From: Palak Jain Date: Mon, 9 Apr 2018 13:58:56 +0530 Subject: [PATCH 1/2] updated LandActivity --- .../java/com/scorelab/kute/kute/LandActivity.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/kute-android-app/app/src/main/java/com/scorelab/kute/kute/LandActivity.java b/kute-android-app/app/src/main/java/com/scorelab/kute/kute/LandActivity.java index 63236475..f54a8b25 100644 --- a/kute-android-app/app/src/main/java/com/scorelab/kute/kute/LandActivity.java +++ b/kute-android-app/app/src/main/java/com/scorelab/kute/kute/LandActivity.java @@ -183,6 +183,7 @@ public void onClick(View v) { .findFragmentById(R.id.mainMapView); mapFragment.getMapAsync(this); + } @Override @@ -309,6 +310,10 @@ public void handleTask(String activity, String type, String vehname, String vehk @Override public void onMapReady(GoogleMap googleMap) { mGoogleMap = googleMap; + + //to zoom in + mGoogleMap.setOnCameraMoveStartedListener(this); + mGoogleMap.setMaxZoomPreference(14.0f); if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { // TODO: Consider calling @@ -323,6 +328,16 @@ public void onMapReady(GoogleMap googleMap) { mGoogleMap.setMyLocationEnabled(true); } + @Override + public void onCameraMoveStarted(int reason) { + + if (reason == OnCameraMoveStartedListener.REASON_GESTURE) { + mGoogleMap.animateCamera(CameraUpdateFactory.zoomIn()); + Toast.makeText(this, "The user gestured on the map.", + Toast.LENGTH_SHORT).show(); + } + } + @Override public void onLocationChanged(Location location) { LatLng latLng = new LatLng(location.getLatitude(), location.getLongitude()); From 9010436ce680a2d78b1c7e1e9cf9780eb654ce32 Mon Sep 17 00:00:00 2001 From: Palak Jain <21954525+till-tomorrow@users.noreply.github.com> Date: Mon, 8 Oct 2018 11:43:04 +0530 Subject: [PATCH 2/2] Update README.md --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 961ae400..668f90f6 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,24 @@ Google Code-in users should checkout the **c_in_refine** branch for all tasks. You'll have all the necessary information to procede in there. +## Code of Conduct and Contribution Practices + +Please help us follow the best practice to make it easy for the reviewer as well as the contributor. +We want to focus on the code quality more than on managing pull request ethics. Follow [Github Flow](https://help.github.com/articles/github-flow/). + +- [People before code](http://hintjens.com/blog:95): If any of the following rules are violated, the pull-requests must not be rejected. This is to create an easy and joyful onboarding process for new programmers and first-time contributors. + +- Single commit per pull request and name the commit as something meaningful + +- Reference the issue numbers in the commit message if it resolves an open issue. Follow the pattern `Fixes # ` + +- Provide relevant screenshot for easier review. + +- In case there are multiple commits on the PR, the commit author should squash them. + +- Avoid duplicate PRs, if need be comment on the older PR with the PR number of the follow-up (new PR) and close the obsolete PR yourself. + +Happy Contributing! ## License