How to make google control buttons round?
They are now square. Such buttons as zoom MyLocation, etc. In Google maps from Google, these buttons are round. How to make them so?
How to make google control buttons round?
They are now square. Such buttons as zoom MyLocation, etc. In Google maps from Google, these buttons are round. How to make them so?
Himself:
<android.support.design.widget.FloatingActionButton android:id="@+id/MyLocation" android:layout_width="wrap_content" android:layout_height="wrap_content" app:backgroundTint="@color/white" android:layout_gravity="bottom|right|end" android:layout_margin="16dp" android:src="@android:drawable/ic_location" />
In class:
private LatLng fromPosition; FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.MyLocation); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { CameraPosition cameraPosition = new CameraPosition.Builder() .target(fromPosition) .zoom(17) .bearing(180) .tilt(80) .build(); map.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition)); } });
PS There are no ready solutions from Google. You have to do it yourself. If you do not want to do this, then it is better to leave the old square solutions.
Source: https://ru.stackoverflow.com/questions/557239/
All Articles