In order to circumvent the usage quota of Google Maps the map provider was changed to be MapBox now. Additionally the maps implementation was refactored to be better extendable in future.
127 lines
5.5 KiB
XML
127 lines
5.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout 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:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
xmlns:mapbox="http://schemas.android.com/apk/res-auto"
|
|
tools:context=".ShareLocationActivity">
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/active_share_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="@dimen/share_location_active_share_container_height"
|
|
app:layout_constraintTop_toTopOf="parent">
|
|
|
|
<TextView
|
|
android:id="@+id/tv_no_active_shares"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/share_location_no_sharings_in_progress"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"/>
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/active_share_layout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:scrollbars="horizontal"
|
|
android:visibility="gone"/>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
|
android:id="@+id/fab_recenter_on_follower"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:src="@android:drawable/ic_menu_compass"
|
|
app:layout_constraintBottom_toBottomOf="@id/mapbox"
|
|
app:layout_constraintEnd_toEndOf="@id/mapbox"
|
|
android:layout_marginBottom="25dp"
|
|
android:layout_marginEnd="25dp"
|
|
android:visibility="gone"/>
|
|
|
|
<com.mapbox.maps.MapView
|
|
android:id="@+id/mapbox"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
app:layout_constraintTop_toBottomOf="@id/active_share_container"
|
|
app:layout_constraintBottom_toTopOf="@id/share_location_info_box"
|
|
app:mapbox_locationComponentEnabled="true"
|
|
app:mapbox_locationComponentPuckBearing="course"
|
|
mapbox:mapbox_styleUri="@string/map_box_style_uri" />
|
|
|
|
<!--
|
|
<androidx.fragment.app.FragmentContainerView
|
|
android:id="@+id/map"
|
|
android:name="com.google.android.gms.maps.SupportMapFragment"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
app:layout_constraintTop_toBottomOf="@id/active_share_container"
|
|
app:layout_constraintBottom_toTopOf="@id/share_location_info_box"
|
|
android:visibility="gone"/>
|
|
-->
|
|
|
|
<com.google.android.material.materialswitch.MaterialSwitch
|
|
android:id="@+id/switch_start_stop_sharing_location"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toTopOf="@id/mapbox"
|
|
app:layout_constraintEnd_toEndOf="@id/mapbox"
|
|
android:text="@string/share_location_toggle_button"/>
|
|
|
|
<androidx.constraintlayout.widget.ConstraintLayout
|
|
android:id="@+id/share_location_info_box"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintBottom_toBottomOf="parent">
|
|
|
|
<ImageView
|
|
android:id="@+id/share_location_info_user_icon"
|
|
android:layout_width="@dimen/share_location_currently_following_picture_width"
|
|
android:layout_height="@dimen/share_location_currently_following_picture_height"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"/>
|
|
|
|
<TextView
|
|
android:id="@+id/share_location_info_title"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
android:textStyle="bold"
|
|
tools:text="@string/share_location_info_title"/>
|
|
|
|
<TextView
|
|
android:id="@+id/share_location_info_location"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toBottomOf="@id/share_location_info_title"
|
|
tools:text="@string/share_location_info_location"/>
|
|
|
|
<TextView
|
|
android:id="@+id/share_location_info_altitude"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toBottomOf="@id/share_location_info_location"
|
|
tools:text="@string/share_location_info_altitude"/>
|
|
|
|
<TextView
|
|
android:id="@+id/share_location_info_speed"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toBottomOf="@id/share_location_info_altitude"
|
|
tools:text="@string/share_location_info_speed"/>
|
|
|
|
<TextView
|
|
android:id="@+id/share_location_info_timestamp"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
app:layout_constraintTop_toBottomOf="@id/share_location_info_speed"
|
|
tools:text="@string/share_location_info_timestamp"/>
|
|
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |