[ShareLocation] Add subscriber logic

Now other people are allowed to follow a shared location as well
while the app is running.
This commit is contained in:
Alexander Dörflinger
2025-03-21 11:30:53 +01:00
parent 5ec30a966f
commit ae50dd89df
13 changed files with 588 additions and 69 deletions

View File

@@ -6,14 +6,48 @@
android:layout_height="match_parent"
tools:context=".ShareLocationActivity">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/active_share_container"
android:layout_width="match_parent"
android:layout_height="75dp"
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>
<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_toTopOf="parent"
app:layout_constraintTop_toBottomOf="@id/active_share_container"
app:layout_constraintBottom_toTopOf="@id/share_location_info_box"/>
<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/map"
app:layout_constraintEnd_toEndOf="@id/map"
android:text="@string/share_location_toggle_button"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/share_location_info_box"
android:layout_width="match_parent"