Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] #5282 - Adding button click listener and updating gradle bu…
Browse files Browse the repository at this point in the history
…ild tool for auto reload
  • Loading branch information
bleege committed Jun 10, 2016
1 parent 9ef630a commit da04faf
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
import android.support.v7.app.ActionBar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.util.Log;
import android.view.Gravity;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import com.mapbox.mapboxsdk.maps.MapView;
Expand All @@ -16,6 +19,8 @@

public class LocationPickerActivity extends AppCompatActivity {

private static final String TAG = "LocationPickerActivity";

private MapView mapView;
private MapboxMap mapboxMap;

Expand Down Expand Up @@ -48,7 +53,18 @@ public void onMapReady(MapboxMap map) {
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.CENTER);
dropPinView.setLayoutParams(params);
mapView.addView(dropPinView);

final Button selectLocation = (Button) findViewById(R.id.selectLocationButton);
selectLocation.setOnClickListener(
new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.i(TAG, "Location Selected!");
}
}
);
}

@Override
public void onResume() {
super.onResume();
Expand Down
2 changes: 1 addition & 1 deletion platform/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.github.JakeWharton:sdk-manager-plugin:220bf7a88a7072df3ed16dc8466fb144f2817070'

// NOTE: Do not place your application dependencies here; they belong
Expand Down

0 comments on commit da04faf

Please sign in to comment.