mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Search this area (#2051)
* Recognize user is moving on the map and show a button * Use variable from strings xml instead of hardcoded string * Change search this area button location in xml file * Add location util file to convert mapbox LatLng to commons Latlng and viceversa * Populate places around searched area * Update narby map according to new points came from searched area * Add searchThisAreaMode boolean to stop nearby map updated when we try to search nearby areas. * Lock auto nearby operations during serch this area mode, with a more modular method and decrease code repetition * Add an if clausse to prevent multiple refresh view calls, while map is moving * Disable map gestures during search this area operation, re-eable them on operation is done * Add progress bar during search this area operation * Make sure you locked the map during search nearby map process * Implement recenter map view button * Fix logic problem and make sure you refreshed the view on coming back to previous position * Use custom refresh method instead * Use latest updated location from location manager isntead * Update ListFragment accordingly too * Do not update camera target according to bottom sheet status or do not follow users location with camera, if search this area mode is on * Add javadocs, sorry forgotten previously * Remove unused method * Threat both or search this area and regular search in same way * Make sure distances are correct * Seperate cutom location updates and current location updates from each other to continue other operations * Remove all logs, and make sure search this are button is not visible for no reason while around of current location is already loaded * Notify load attractions from location method about search status, current location of custom location * Make sure we calculate searched area and display search this area button when we are out of 3/4 of total searched area
This commit is contained in:
parent
b907a0a8f1
commit
677e0099af
9 changed files with 283 additions and 32 deletions
|
|
@ -19,7 +19,6 @@
|
|||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -70,6 +69,28 @@
|
|||
android:id="@+id/bottom_sheet_details"
|
||||
layout="@layout/bottom_sheet_details" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/search_this_area_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@color/white"
|
||||
android:singleLine="true"
|
||||
android:visibility="gone"
|
||||
app:elevation="6dp"
|
||||
android:layout_margin="8dp"
|
||||
android:padding="8dp"
|
||||
android:textColor="@color/status_bar_blue"
|
||||
android:text="@string/search_this_area" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/search_this_area_button_progres_bar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:visibility="gone"
|
||||
/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
android:id="@+id/fab_plus"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue