feat: XMLs, UI

This commit is contained in:
Piotr Dec 2024-08-04 01:24:44 +02:00
parent db180a4a18
commit ca7d418726
Signed by: stawros
GPG key ID: F89F27AD8F881A91
4 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp" />
<solid android:color="@color/white" />
</shape>

View file

@ -4,6 +4,22 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<EditText
android:id="@+id/query"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:autofillHints="@null"
android:background="@drawable/card_background"
android:elevation="4dp"
android:hint="@string/place_autocomplete_query_hint"
android:inputType="text"
android:minHeight="?actionBarSize"
android:paddingHorizontal="16dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.mapbox.maps.MapView <com.mapbox.maps.MapView
android:id="@+id/mapView" android:id="@+id/mapView"
android:layout_width="0dp" android:layout_width="0dp"
@ -38,6 +54,39 @@
app:srcCompat="@android:drawable/ic_delete" /> app:srcCompat="@android:drawable/ic_delete" />
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>
<com.mapbox.search.ui.view.SearchResultsView
android:id="@+id/searchResults"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginHorizontal="16dp"
android:layout_marginTop="16dp"
android:background="@drawable/card_background"
android:clipToPadding="false"
android:elevation="4dp"
android:paddingTop="8dp"
android:paddingBottom="22dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/query"
/>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/searchContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="@dimen/search_card_elevation"
>
<com.mapbox.search.ui.view.place.SearchPlaceBottomSheetView
android:id="@+id/searchPlaces"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:elevation="@dimen/search_card_elevation"
/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
<com.mapbox.navigation.ui.components.maneuver.view.MapboxManeuverView <com.mapbox.navigation.ui.components.maneuver.view.MapboxManeuverView
android:id="@+id/maneuverView" android:id="@+id/maneuverView"
android:layout_width="0dp" android:layout_width="0dp"

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="search_card_elevation">8dp</dimen>
</resources>

View file

@ -1,4 +1,9 @@
<resources> <resources>
<string name="app_name">Garmin</string> <string name="app_name">Garmin</string>
<string name="mapbox_access_token">pk.eyJ1IjoibWFwcy16dHNoIiwiYSI6ImNsbDl4YXU4cjA3eW8zcXMzbXdjYjNsN3oifQ.kbDCjthamXvXX_pAdsq3hQ</string> <string name="mapbox_access_token">pk.eyJ1IjoibWFwcy16dHNoIiwiYSI6ImNsbDl4YXU4cjA3eW8zcXMzbXdjYjNsN3oifQ.kbDCjthamXvXX_pAdsq3hQ</string>
<string name="place_autocomplete_query_hint">Search for places</string>
<string name="place_autocomplete_reverse_geocoding_error_message">Unable to locate selected coordinate</string>
<string name="place_autocomplete_selection_error">Error happened during request</string>
</resources> </resources>