select loc butt

This commit is contained in:
Adam Domagalski 2018-11-01 20:38:52 +01:00
parent 1ae9217819
commit d090893044
2 changed files with 16 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import static com.mapbox.mapboxsdk.style.layers.Property.VISIBLE;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.circleColor;
import android.graphics.Color;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.circleRadius;
@ -138,6 +139,10 @@ public class MapActivity extends BaseActivity
private void setOnMapLongClickListener() {
mapboxMap.addOnMapLongClickListener((LatLng latLng) -> {
Log.e(tag, "eeeeee");
Button button = findViewById(R.id.select_location_button);
button.setVisibility(View.VISIBLE);
button.setOnClickListener();
});
}

View File

@ -90,6 +90,17 @@
fab:fab_title="@string/fab_title_attractions" />
</com.getbase.floatingactionbutton.FloatingActionsMenu>
<Button
android:id="@+id/select_location_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_margin="8dp"
android:background="@color/colorPrimary"
android:text="Select a location"
android:textColor="@android:color/white"
android:visibility="gone" />
</LinearLayout>
</android.support.constraint.ConstraintLayout>