Map style, graphics refinements

This commit is contained in:
Daniele Verducci (Slimpenguin) 2024-02-22 07:22:32 +01:00
parent 739399f54b
commit ae9274d646
6 changed files with 32 additions and 14 deletions

View File

@ -19,6 +19,7 @@ import androidx.lifecycle.Observer;
import org.osmdroid.api.IMapController;
import org.osmdroid.events.MapEventsReceiver;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.CustomZoomButtonsController;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.MapEventsOverlay;
import org.osmdroid.views.overlay.Marker;
@ -54,6 +55,9 @@ public class GeofavoriteMapFragment extends GeofavoritesFragment implements Main
// Setup map
map = v.findViewById(R.id.map);
map.getZoomController().setVisibility(CustomZoomButtonsController.Visibility.NEVER);
map.setMultiTouchControls(true);
MapUtils.setTheme(map);
MapEventsOverlay meo = new MapEventsOverlay(requireContext(), new MapEventsReceiver() {
@Override
public boolean singleTapConfirmedHelper(GeoPoint p) {

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape
android:shape="oval">
<solid android:color="@color/translucent"/>
</shape>
</item>
</layer-list>

View File

@ -4,7 +4,8 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_marginTop="10dp">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"

View File

@ -29,7 +29,9 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="?android:attr/actionBarSize"
android:paddingTop="10dp">
android:paddingTop="20dp"
android:paddingStart="5dp"
android:paddingEnd="5dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/sort_mode"

View File

@ -39,13 +39,15 @@
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/view_mode_list"
android:layout_width="wrap_content"
android:layout_width="@dimen/floating_bar_height"
android:layout_height="@dimen/floating_bar_height"
android:layout_marginTop="2dp"
android:layout_marginEnd="@dimen/spacer_2x"
android:layout_gravity="right"
android:background="?android:attr/selectableItemBackgroundBorderless"
android:background="@drawable/unselected_floating_semitransparent_button_background"
android:contentDescription="@string/list_mode"
android:paddingStart="@dimen/spacer_2x"
android:paddingEnd="@dimen/spacer_2x"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:tint="@color/text_color"
android:src="@drawable/ic_view_list" />

View File

@ -20,7 +20,7 @@
<!-- Generic Colors -->
<color name="primary">#ffffff</color>
<color name="transparent">#00000000</color>
<color name="translucent">#CFFF</color>
<color name="translucent">#AEFFFFFF</color>
<color name="defaultBrand">#0082C9</color>
<color name="defaultBrandAlpha">#550082C9</color>
<color name="disabled">#666</color>