apps-android-commons/app/src/main/res/layout/bottom_container_location_picker.xml
Shashwat Kedia 0a6257b27b
Adds a 'Remove Location' button to the UploadWizard #5247 (#5672)
* Implemented basic flow to remove location

* Fixed and added new tests and enhanced UX
2024-03-30 23:34:55 +09:00

116 lines
No EOL
4.7 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"
android:layout_gravity="bottom">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/location_chosen_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:contentDescription="@string/select_location_location_picker"
android:tint="@color/white"
app:backgroundTint="@color/wikimedia_green"
app:elevation="3dp"
app:layout_anchorGravity="top|end"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:srcCompat="@drawable/ic_check_black_24dp" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/center_on_gps"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:contentDescription="@string/select_location_location_picker"
app:backgroundTint="@color/white"
app:elevation="3dp"
app:layout_anchorGravity="bottom|end"
app:layout_constraintBottom_toTopOf="@+id/location_chosen_button"
app:layout_constraintEnd_toEndOf="@id/location_chosen_button"
app:srcCompat="@drawable/ic_my_location_black_24dp" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tv_attribution"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/map_attribution"
android:textAlignment="center"
android:layout_margin="8dp"
android:textSize="10sp"
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@+id/map_bottom_layout"
app:layout_constraintStart_toStartOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/map_bottom_layout"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<Button
android:id="@+id/remove_location"
style="@style/Widget.AppCompat.Button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:backgroundTint="@color/deleteRed"
android:text="@string/remove_location"
android:textColor="@color/white"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/map_bottom_layout"
app:layout_constraintEnd_toStartOf="@+id/guideline2"
app:layout_constraintStart_toStartOf="@id/map_bottom_layout"
app:layout_constraintTop_toTopOf="@id/map_bottom_layout" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.35" />
<Button
android:id="@+id/modify_location"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/modify_location"
android:textColor="@color/white"
android:visibility="gone"
android:layout_margin="5dp"
app:layout_constraintBottom_toBottomOf="@id/map_bottom_layout"
app:layout_constraintEnd_toStartOf="@+id/guideline3"
app:layout_constraintStart_toEndOf="@+id/guideline2"
app:layout_constraintTop_toTopOf="@id/map_bottom_layout" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.7" />
<TextView
android:id="@+id/show_in_map"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@string/show_in_map_app"
android:textAlignment="center"
android:textColor="@color/primaryColor"
android:textSize="14sp"
android:visibility="gone"
android:layout_margin="5dp"
app:layout_constraintBottom_toBottomOf="@id/map_bottom_layout"
app:layout_constraintEnd_toEndOf="@id/map_bottom_layout"
app:layout_constraintStart_toStartOf="@+id/guideline3"
app:layout_constraintTop_toTopOf="@id/map_bottom_layout" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>