apps-android-commons/app/src/main/res/layout/fragment_nearby_parent.xml
Ashish 6588a6fd0e
Fixes #545 - Add support for campaigns (#4423)
* Integrate WLM
- Show monuments in maps along with nearby

* BugFix in Monuments
1. Single preference for monuments and campaigns
2. Expand collapse chips container in nearby
3. Typo fix in Monuments card in Nearby
4. If a nearby place is a monument as well - do not show them separately, show it as a monument instead
5. Bug fix, monument radius, use the same one as that of nearby

* More bug fixes
1. Possible NPE in nearby
2. Added column location_address in BookmarkLocationDao
3. Bug Fix - Display Date in WLM card
4. WLM card on click takes to nearby

* Use lowercase country code in WLM uploads

* Bug-Fix, WLM Campaign Icon

* 1. Updated monuments query to use any of the following properties for monuments - [P1435, P2186, P1459, P1460, P1216, P709, P718, P5694] 2. Append WikiData QID to descriptions template

* Updated WLM Banner String, Handle NPE in contributions callback

* Added nearby-monuments query log lines

* Handle WLM Query exception : - if an exception is thrown in WLM query, continue showing the nearby items if that succeeds

* Fix BookmarkLocationDaoTest

* Added Column Address in BookmarkLocationDaoTest

* Use fallback description as usual nearby pins even for WLM pins, instead of relying on P6375

* Test fix in BookmarkLocationDao

* Updated template for WLM, removed redundant feilds

* Fixed WLM template

* Removed categories from WLM template

* Fixed BookmarkControllerTest

* Fixed BookmarkLocationFragmentUnitTest

* fix ModelFunctions

* Fixed BookmarksDaoLocationTest

* Fixed WLM template
2021-08-18 18:27:26 +10:00

214 lines
No EOL
8.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
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"
android:background="@color/status_bar_blue"
android:id="@+id/map_layout">
<include
layout="@layout/nearby_filter_all_items"
android:id="@+id/nearby_filter"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="12dp"
android:gravity="center"
android:id="@+id/rl_container_wlm_month_message"
android:background="@color/white"
tools:visibility="visible"
android:visibility="gone"
android:layout_below="@id/nearby_filter">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toStartOf="@id/tv_learn_more"
android:textStyle="bold"
android:textColor="@color/secondaryTextColor"
android:text="@string/wlm_month_message"/>
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_learn_more"
android:textColor="@color/status_bar_blue"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_alignParentEnd="true"
android:text="@string/learn_more"
android:layout_height="wrap_content">
</androidx.appcompat.widget.AppCompatTextView>
</RelativeLayout>
<include layout="@layout/nearby_filter_list"
android:id="@+id/nearby_filter_list"
android:layout_below="@id/nearby_filter"
android:layout_height="@dimen/giant_height"
android:layout_width="@dimen/giant_height"
android:layout_alignParentEnd="true"/>
<!-- I have done this intentionally, the mapview because of some elevation or something,
sometimes hangs over the drawer layout and sometimes draws its onPaused state over the contributions, this seems to be the probable fix -->
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/rl_container_wlm_month_message">
<com.mapbox.mapboxsdk.maps.MapView
android:id="@+id/map_view"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<View
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/transparent" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_attribution"
android:textStyle="bold"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:text="@string/map_attribution"
android:textAlignment="center"
android:textSize="10sp" />
</RelativeLayout>
<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:layout_margin="@dimen/activity_margin_horizontal"
android:background="@color/white"
android:padding="@dimen/activity_margin_horizontal"
android:singleLine="true"
android:text="@string/search_this_area"
android:textColor="@color/status_bar_blue"
android:visibility="gone"
app:elevation="@dimen/dimen_6"
android:layout_below="@id/rl_container_wlm_month_message"
/>
<View
android:id="@+id/transparentView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:background="#aa969696"
android:visibility="gone"
android:elevation="@dimen/dimen_6">
</View>
<com.google.android.material.floatingactionbutton.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/rl_container_wlm_month_message"
android:clickable="true"
android:visibility="visible"
app:backgroundTint="@color/main_background_light"
app:elevation="@dimen/dimen_6"
app:fabSize="normal"
app:layout_anchorGravity="top|right|end"
app:srcCompat="@drawable/ic_my_location_black_24dp"
app:useCompatPadding="true" />
</RelativeLayout>
<include layout="@layout/bottom_sheet_nearby" />
<include
android:id="@+id/bottom_sheet_details"
layout="@layout/bottom_sheet_details" />
<ProgressBar
android:id="@+id/map_progress_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
app:elevation="@dimen/dimen_6"
android:visibility="gone" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_plus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="@dimen/medium_height"
android:layout_marginRight="@dimen/medium_height"
android:clickable="true"
android:visibility="invisible"
app:backgroundTint="@color/button_blue"
app:elevation="@dimen/activity_margin_horizontal"
app:fabSize="normal"
app:layout_anchor="@id/bottom_sheet_details"
app:layout_anchorGravity="top|right|end"
app:pressedTranslationZ="@dimen/medium_height"
app:srcCompat="@drawable/ic_add_white_24dp"
app:useCompatPadding="true" />
<View
android:id="@+id/empty_view1"
android:layout_width="56dp"
android:layout_height="174dp"
android:visibility="invisible"
app:layout_anchor="@id/fab_plus"
app:layout_anchorGravity="center_horizontal" />
<View
android:id="@+id/empty_view"
android:layout_width="56dp"
android:layout_height="46dp"
android:visibility="invisible"
app:layout_anchor="@id/fab_plus"
app:layout_anchorGravity="center_horizontal" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_camera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:tint="@color/button_blue"
android:visibility="invisible"
app:backgroundTint="@color/main_background_light"
app:elevation="@dimen/dimen_6"
app:fabSize="mini"
app:layout_anchor="@id/empty_view1"
app:layout_anchorGravity="center_horizontal"
app:pressedTranslationZ="@dimen/medium_height"
app:srcCompat="@drawable/ic_photo_camera_white_24dp" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/fab_gallery"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"
android:tint="@color/button_blue"
android:visibility="invisible"
app:backgroundTint="@color/main_background_light"
app:elevation="@dimen/dimen_6"
app:fabSize="mini"
app:layout_anchor="@id/empty_view"
app:layout_anchorGravity="center_horizontal"
app:pressedTranslationZ="@dimen/medium_height"
app:srcCompat="@drawable/ic_photo_white_24dp" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>