mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Fixes issues #1228 added recenter button to nearby map
This commit is contained in:
parent
fc91fb8d39
commit
b7b87e0615
5 changed files with 323 additions and 86 deletions
|
|
@ -3,7 +3,6 @@ package fr.free.nrw.commons.nearby;
|
||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.animation.TypeEvaluator;
|
import android.animation.TypeEvaluator;
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
|
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
|
@ -15,8 +14,6 @@ import android.support.annotation.Nullable;
|
||||||
import android.support.design.widget.BottomSheetBehavior;
|
import android.support.design.widget.BottomSheetBehavior;
|
||||||
import android.support.design.widget.CoordinatorLayout;
|
import android.support.design.widget.CoordinatorLayout;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
|
|
@ -82,6 +79,7 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
private FloatingActionButton fabPlus;
|
private FloatingActionButton fabPlus;
|
||||||
private FloatingActionButton fabCamera;
|
private FloatingActionButton fabCamera;
|
||||||
private FloatingActionButton fabGallery;
|
private FloatingActionButton fabGallery;
|
||||||
|
private FloatingActionButton fabRecenter;
|
||||||
private View transparentView;
|
private View transparentView;
|
||||||
private TextView description;
|
private TextView description;
|
||||||
private TextView title;
|
private TextView title;
|
||||||
|
|
@ -109,8 +107,12 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
private boolean isBottomListSheetExpanded;
|
private boolean isBottomListSheetExpanded;
|
||||||
private final double CAMERA_TARGET_SHIFT_FACTOR = 0.06;
|
private final double CAMERA_TARGET_SHIFT_FACTOR = 0.06;
|
||||||
|
|
||||||
@Inject @Named("prefs") SharedPreferences prefs;
|
@Inject
|
||||||
@Inject @Named("direct_nearby_upload_prefs") SharedPreferences directPrefs;
|
@Named("prefs")
|
||||||
|
SharedPreferences prefs;
|
||||||
|
@Inject
|
||||||
|
@Named("direct_nearby_upload_prefs")
|
||||||
|
SharedPreferences directPrefs;
|
||||||
|
|
||||||
public NearbyMapFragment() {
|
public NearbyMapFragment() {
|
||||||
}
|
}
|
||||||
|
|
@ -125,10 +127,12 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
if (bundle != null) {
|
if (bundle != null) {
|
||||||
String gsonPlaceList = bundle.getString("PlaceList");
|
String gsonPlaceList = bundle.getString("PlaceList");
|
||||||
String gsonLatLng = bundle.getString("CurLatLng");
|
String gsonLatLng = bundle.getString("CurLatLng");
|
||||||
|
Type listType = new TypeToken<List<Place>>() {
|
||||||
|
}.getType();
|
||||||
String gsonBoundaryCoordinates = bundle.getString("BoundaryCoord");
|
String gsonBoundaryCoordinates = bundle.getString("BoundaryCoord");
|
||||||
Type listType = new TypeToken<List<Place>>() {}.getType();
|
|
||||||
List<Place> placeList = gson.fromJson(gsonPlaceList, listType);
|
List<Place> placeList = gson.fromJson(gsonPlaceList, listType);
|
||||||
Type curLatLngType = new TypeToken<fr.free.nrw.commons.location.LatLng>() {}.getType();
|
Type curLatLngType = new TypeToken<fr.free.nrw.commons.location.LatLng>() {
|
||||||
|
}.getType();
|
||||||
Type gsonBoundaryCoordinatesType = new TypeToken<fr.free.nrw.commons.location.LatLng[]>() {}.getType();
|
Type gsonBoundaryCoordinatesType = new TypeToken<fr.free.nrw.commons.location.LatLng[]>() {}.getType();
|
||||||
curLatLng = gson.fromJson(gsonLatLng, curLatLngType);
|
curLatLng = gson.fromJson(gsonLatLng, curLatLngType);
|
||||||
baseMarkerOptions = NearbyController
|
baseMarkerOptions = NearbyController
|
||||||
|
|
@ -167,8 +171,7 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
.STATE_EXPANDED) {
|
.STATE_EXPANDED) {
|
||||||
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
|
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
|
||||||
return true;
|
return true;
|
||||||
}
|
} else if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior
|
||||||
else if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior
|
|
||||||
.STATE_COLLAPSED) {
|
.STATE_COLLAPSED) {
|
||||||
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
|
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
|
||||||
mapView.getMapAsync(MapboxMap::deselectMarkers);
|
mapView.getMapAsync(MapboxMap::deselectMarkers);
|
||||||
|
|
@ -301,6 +304,7 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
fabPlus = getActivity().findViewById(R.id.fab_plus);
|
fabPlus = getActivity().findViewById(R.id.fab_plus);
|
||||||
fabCamera = getActivity().findViewById(R.id.fab_camera);
|
fabCamera = getActivity().findViewById(R.id.fab_camera);
|
||||||
fabGallery = getActivity().findViewById(R.id.fab_galery);
|
fabGallery = getActivity().findViewById(R.id.fab_galery);
|
||||||
|
fabRecenter = getActivity().findViewById(R.id.fab_recenter);
|
||||||
|
|
||||||
fab_open = AnimationUtils.loadAnimation(getActivity(), R.anim.fab_open);
|
fab_open = AnimationUtils.loadAnimation(getActivity(), R.anim.fab_open);
|
||||||
fab_close = AnimationUtils.loadAnimation(getActivity(), R.anim.fab_close);
|
fab_close = AnimationUtils.loadAnimation(getActivity(), R.anim.fab_close);
|
||||||
|
|
@ -332,12 +336,26 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
bottomSheetDetails.setOnClickListener(view -> {
|
bottomSheetDetails.setOnClickListener(view -> {
|
||||||
if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED) {
|
if (bottomSheetDetailsBehavior.getState() == BottomSheetBehavior.STATE_COLLAPSED) {
|
||||||
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_EXPANDED);
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
|
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_COLLAPSED);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
fabRecenter.setOnClickListener(view -> {
|
||||||
|
if (curLatLng != null) {
|
||||||
|
mapView.getMapAsync(mapboxMap -> {
|
||||||
|
CameraPosition position = new CameraPosition.Builder()
|
||||||
|
.target(new LatLng(curLatLng.getLatitude(), curLatLng.getLongitude())) // Sets the new camera position
|
||||||
|
.zoom(11) // Sets the zoom
|
||||||
|
.build(); // Creates a CameraPosition from the builder
|
||||||
|
|
||||||
|
mapboxMap.animateCamera(CameraUpdateFactory
|
||||||
|
.newCameraPosition(position), 1000);
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
bottomSheetDetailsBehavior.setBottomSheetCallback(new BottomSheetBehavior
|
bottomSheetDetailsBehavior.setBottomSheetCallback(new BottomSheetBehavior
|
||||||
.BottomSheetCallback() {
|
.BottomSheetCallback() {
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -452,6 +470,14 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
|
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
mapView.getMapAsync(mapboxMap -> {
|
||||||
|
mapboxMap.addMarkers(baseMarkerOptions);
|
||||||
|
fabRecenter.setVisibility(View.VISIBLE);
|
||||||
|
mapboxMap.setOnInfoWindowCloseListener(marker -> {
|
||||||
|
if (marker == selected) {
|
||||||
|
bottomSheetDetailsBehavior.setState(BottomSheetBehavior.STATE_HIDDEN);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
mapboxMap.setOnMarkerClickListener(marker -> {
|
mapboxMap.setOnMarkerClickListener(marker -> {
|
||||||
if (marker instanceof NearbyMarker) {
|
if (marker instanceof NearbyMarker) {
|
||||||
|
|
@ -465,10 +491,10 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a series of points that create a circle on the map.
|
* Creates a series of points that create a circle on the map.
|
||||||
* Takes the center latitude, center longitude of the circle,
|
* Takes the center latitude, center longitude of the circle,
|
||||||
|
|
@ -684,6 +710,7 @@ public class NearbyMapFragment extends DaggerFragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void animateFAB(boolean isFabOpen) {
|
private void animateFAB(boolean isFabOpen) {
|
||||||
|
this.isFabOpen = !isFabOpen;
|
||||||
if (fabPlus.isShown()){
|
if (fabPlus.isShown()){
|
||||||
if (isFabOpen) {
|
if (isFabOpen) {
|
||||||
fabPlus.startAnimation(rotate_backward);
|
fabPlus.startAnimation(rotate_backward);
|
||||||
|
|
|
||||||
9
app/src/main/res/drawable/ic_my_location_black_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_my_location_black_24dp.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24.0"
|
||||||
|
android:viewportHeight="24.0">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:pathData="M12,8c-2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4 -1.79,-4 -4,-4zM20.94,11c-0.46,-4.17 -3.77,-7.48 -7.94,-7.94L13,1h-2v2.06C6.83,3.52 3.52,6.83 3.06,11L1,11v2h2.06c0.46,4.17 3.77,7.48 7.94,7.94L11,23h2v-2.06c4.17,-0.46 7.48,-3.77 7.94,-7.94L23,13v-2h-2.06zM12,19c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z"/>
|
||||||
|
</vector>
|
||||||
165
app/src/main/res/layout-land/activity_nearby.xml
Normal file
165
app/src/main/res/layout-land/activity_nearby.xml
Normal file
|
|
@ -0,0 +1,165 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/drawer_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/coordinator_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
>
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/toolbar"
|
||||||
|
layout="@layout/toolbar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content" />
|
||||||
|
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:layout_below="@id/toolbar">
|
||||||
|
|
||||||
|
<ProgressBar
|
||||||
|
android:id="@+id/progressBar"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_centerInParent="true" />
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/container"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"></FrameLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/transparentView"
|
||||||
|
android:layout_below="@id/toolbar"
|
||||||
|
android:background="#aa969696"
|
||||||
|
android:elevation="6dp"
|
||||||
|
/>
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab_recenter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
|
android:layout_marginRight="12dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:backgroundTint="@color/main_background_light"
|
||||||
|
app:elevation="6dp"
|
||||||
|
app:fabSize="normal"
|
||||||
|
app:layout_anchorGravity="top|right|end"
|
||||||
|
app:srcCompat="@drawable/ic_my_location_black_24dp" />
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
<include layout="@layout/bottom_sheet_nearby" />
|
||||||
|
<include layout="@layout/bottom_sheet_details" android:id="@+id/bottom_sheet_details" />
|
||||||
|
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab_plus"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:fabSize="normal"
|
||||||
|
android:layout_margin="16dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
android:clickable="true"
|
||||||
|
app:elevation="6dp"
|
||||||
|
app:pressedTranslationZ="12dp"
|
||||||
|
app:backgroundTint="@color/button_blue"
|
||||||
|
app:layout_anchor="@id/bottom_sheet_details"
|
||||||
|
app:layout_anchorGravity="top|right|end"
|
||||||
|
app:srcCompat="@drawable/ic_add_white_24dp"/>
|
||||||
|
<View
|
||||||
|
android:id = "@+id/empty_view2"
|
||||||
|
android:layout_height = "306dip"
|
||||||
|
android:layout_width = "56dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_anchor="@id/fab_plus"
|
||||||
|
app:layout_anchorGravity="center_horizontal"
|
||||||
|
/>
|
||||||
|
<View
|
||||||
|
android:id = "@+id/empty_view1"
|
||||||
|
android:layout_height = "186dip"
|
||||||
|
android:layout_width = "56dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_anchor="@id/fab_plus"
|
||||||
|
app:layout_anchorGravity="center_horizontal"
|
||||||
|
/>
|
||||||
|
<View
|
||||||
|
android:id = "@+id/empty_view"
|
||||||
|
android:layout_height = "66dip"
|
||||||
|
android:layout_width = "56dp"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_anchor="@id/fab_plus"
|
||||||
|
app:layout_anchorGravity="center_horizontal"
|
||||||
|
/>
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab_camera"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:fabSize="mini"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:backgroundTint="@color/main_background_light"
|
||||||
|
app:elevation="6dp"
|
||||||
|
app:pressedTranslationZ="12dp"
|
||||||
|
app:layout_anchor="@id/empty_view1"
|
||||||
|
app:layout_anchorGravity="center_horizontal"
|
||||||
|
app:srcCompat="@drawable/ic_photo_camera_white_24dp"
|
||||||
|
android:tint="@color/button_blue"
|
||||||
|
android:scaleType="center"/>
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab_galery"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:fabSize="mini"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:backgroundTint="@color/main_background_light"
|
||||||
|
app:elevation="6dp"
|
||||||
|
app:pressedTranslationZ="12dp"
|
||||||
|
app:layout_anchor="@id/empty_view"
|
||||||
|
app:layout_anchorGravity="center_horizontal"
|
||||||
|
app:srcCompat="@drawable/ic_photo_white_24dp"
|
||||||
|
android:tint="@color/button_blue"
|
||||||
|
android:scaleType="center"
|
||||||
|
/>
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab_commons_page"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:fabSize="mini"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:backgroundTint="@color/main_background_light"
|
||||||
|
app:elevation="6dp"
|
||||||
|
app:pressedTranslationZ="12dp"
|
||||||
|
app:layout_anchor="@id/empty_view2"
|
||||||
|
app:layout_anchorGravity="center_horizontal"
|
||||||
|
app:srcCompat="@drawable/ic_commons_icon_vector"
|
||||||
|
android:scaleType="center"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<android.support.design.widget.NavigationView
|
||||||
|
android:id="@+id/navigation_view"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="start"
|
||||||
|
app:headerLayout="@layout/drawer_header"
|
||||||
|
app:menu="@menu/drawer"/>
|
||||||
|
|
||||||
|
</android.support.v4.widget.DrawerLayout>
|
||||||
|
|
@ -4,12 +4,13 @@
|
||||||
android:id="@+id/drawer_layout"
|
android:id="@+id/drawer_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:id="@+id/coordinator_layout"
|
android:id="@+id/coordinator_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent">
|
||||||
>
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
@ -23,10 +24,10 @@
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_below="@id/toolbar"
|
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
|
||||||
<ProgressBar
|
<ProgressBar
|
||||||
android:id="@+id/progressBar"
|
android:id="@+id/progressBar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
@ -54,101 +55,133 @@
|
||||||
app:srcCompat="@drawable/ic_list_white_24dp"
|
app:srcCompat="@drawable/ic_list_white_24dp"
|
||||||
android:scaleType="center"
|
android:scaleType="center"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
android:id="@+id/transparentView"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:id="@+id/transparentView"
|
android:layout_alignParentLeft="true"
|
||||||
android:layout_below="@id/toolbar"
|
android:layout_alignParentStart="true"
|
||||||
|
android:layout_alignParentTop="true"
|
||||||
|
android:layout_marginTop="18dp"
|
||||||
android:background="#aa969696"
|
android:background="#aa969696"
|
||||||
android:elevation="6dp"
|
android:elevation="6dp">
|
||||||
/>
|
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/fab_recenter"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_below="@+id/toolbar"
|
||||||
|
android:layout_marginRight="12dp"
|
||||||
|
android:layout_marginTop="6dp"
|
||||||
|
android:clickable="true"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:backgroundTint="@color/main_background_light"
|
||||||
|
app:elevation="6dp"
|
||||||
|
app:fabSize="normal"
|
||||||
|
app:layout_anchorGravity="top|right|end"
|
||||||
|
app:srcCompat="@drawable/ic_my_location_black_24dp" />
|
||||||
|
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<include layout="@layout/bottom_sheet_nearby" />
|
<include layout="@layout/bottom_sheet_nearby" />
|
||||||
<include layout="@layout/bottom_sheet_details" android:id="@+id/bottom_sheet_details" />
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/bottom_sheet_details"
|
||||||
|
layout="@layout/bottom_sheet_details" />
|
||||||
|
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/fab_plus"
|
android:id="@+id/fab_plus"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:fabSize="normal"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_margin="16dp"
|
android:layout_alignParentEnd="true"
|
||||||
android:visibility="invisible"
|
android:layout_alignParentRight="true"
|
||||||
|
android:layout_marginEnd="12dp"
|
||||||
|
android:layout_marginRight="12dp"
|
||||||
android:clickable="true"
|
android:clickable="true"
|
||||||
app:elevation="6dp"
|
android:visibility="invisible"
|
||||||
app:pressedTranslationZ="12dp"
|
|
||||||
app:backgroundTint="@color/button_blue"
|
app:backgroundTint="@color/button_blue"
|
||||||
|
app:elevation="6dp"
|
||||||
|
app:fabSize="normal"
|
||||||
app:layout_anchor="@id/bottom_sheet_details"
|
app:layout_anchor="@id/bottom_sheet_details"
|
||||||
app:layout_anchorGravity="top|right|end"
|
app:layout_anchorGravity="top|right|end"
|
||||||
|
app:pressedTranslationZ="12dp"
|
||||||
app:srcCompat="@drawable/ic_add_white_24dp" />
|
app:srcCompat="@drawable/ic_add_white_24dp" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/empty_view2"
|
android:id="@+id/empty_view2"
|
||||||
android:layout_height = "306dip"
|
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
|
android:layout_height="306dip"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_anchor="@id/fab_plus"
|
app:layout_anchor="@id/fab_plus"
|
||||||
app:layout_anchorGravity="center_horizontal"
|
app:layout_anchorGravity="center_horizontal" />
|
||||||
/>
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/empty_view1"
|
android:id="@+id/empty_view1"
|
||||||
android:layout_height = "186dip"
|
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
|
android:layout_height="186dip"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_anchor="@id/fab_plus"
|
app:layout_anchor="@id/fab_plus"
|
||||||
app:layout_anchorGravity="center_horizontal"
|
app:layout_anchorGravity="center_horizontal" />
|
||||||
/>
|
|
||||||
<View
|
<View
|
||||||
android:id="@+id/empty_view"
|
android:id="@+id/empty_view"
|
||||||
android:layout_height = "66dip"
|
|
||||||
android:layout_width="56dp"
|
android:layout_width="56dp"
|
||||||
|
android:layout_height="66dip"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:layout_anchor="@id/fab_plus"
|
app:layout_anchor="@id/fab_plus"
|
||||||
app:layout_anchorGravity="center_horizontal"
|
app:layout_anchorGravity="center_horizontal" />
|
||||||
/>
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/fab_camera"
|
android:id="@+id/fab_camera"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:fabSize="mini"
|
android:scaleType="center"
|
||||||
|
android:tint="@color/button_blue"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:backgroundTint="@color/main_background_light"
|
app:backgroundTint="@color/main_background_light"
|
||||||
app:elevation="6dp"
|
app:elevation="6dp"
|
||||||
app:pressedTranslationZ="12dp"
|
app:fabSize="mini"
|
||||||
app:layout_anchor="@id/empty_view1"
|
app:layout_anchor="@id/empty_view1"
|
||||||
app:layout_anchorGravity="center_horizontal"
|
app:layout_anchorGravity="center_horizontal"
|
||||||
app:srcCompat="@drawable/ic_photo_camera_white_24dp"
|
app:pressedTranslationZ="12dp"
|
||||||
android:tint="@color/button_blue"
|
app:srcCompat="@drawable/ic_photo_camera_white_24dp" />
|
||||||
android:scaleType="center"/>
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/fab_galery"
|
android:id="@+id/fab_galery"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:fabSize="mini"
|
android:scaleType="center"
|
||||||
|
android:tint="@color/button_blue"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:backgroundTint="@color/main_background_light"
|
app:backgroundTint="@color/main_background_light"
|
||||||
app:elevation="6dp"
|
app:elevation="6dp"
|
||||||
app:pressedTranslationZ="12dp"
|
app:fabSize="mini"
|
||||||
app:layout_anchor="@id/empty_view"
|
app:layout_anchor="@id/empty_view"
|
||||||
app:layout_anchorGravity="center_horizontal"
|
app:layout_anchorGravity="center_horizontal"
|
||||||
app:srcCompat="@drawable/ic_photo_white_24dp"
|
app:pressedTranslationZ="12dp"
|
||||||
android:tint="@color/button_blue"
|
app:srcCompat="@drawable/ic_photo_white_24dp" />
|
||||||
android:scaleType="center"
|
|
||||||
/>
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:id="@+id/fab_commons_page"
|
android:id="@+id/fab_commons_page"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
app:fabSize="mini"
|
android:scaleType="center"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:backgroundTint="@color/main_background_light"
|
app:backgroundTint="@color/main_background_light"
|
||||||
app:elevation="6dp"
|
app:elevation="6dp"
|
||||||
app:pressedTranslationZ="12dp"
|
app:fabSize="mini"
|
||||||
app:layout_anchor="@id/empty_view2"
|
app:layout_anchor="@id/empty_view2"
|
||||||
app:layout_anchorGravity="center_horizontal"
|
app:layout_anchorGravity="center_horizontal"
|
||||||
app:srcCompat="@drawable/ic_commons_icon_vector"
|
app:pressedTranslationZ="12dp"
|
||||||
android:scaleType="center"
|
app:srcCompat="@drawable/ic_commons_icon_vector" />
|
||||||
/>
|
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@ BUTTERKNIFE_VERSION=8.6.0
|
||||||
org.gradle.jvmargs=-Xmx1536M
|
org.gradle.jvmargs=-Xmx1536M
|
||||||
buildToolsVersion=26.0.2
|
buildToolsVersion=26.0.2
|
||||||
targetSdkVersion=25
|
targetSdkVersion=25
|
||||||
|
|
||||||
|
#TODO: Temporary disabled. https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#aapt2
|
||||||
|
#Refer to PR: https://github.com/commons-app/apps-android-commons/pull/932
|
||||||
android.enableAapt2=false
|
android.enableAapt2=false
|
||||||
SUPPORT_LIB_VERSION=26.0.2
|
SUPPORT_LIB_VERSION=26.0.2
|
||||||
minSdkVersion=15
|
minSdkVersion=15
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue