replace current-position icon

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2021-06-08 17:59:01 +02:00 committed by Andy Scherzinger
parent 22333d2f57
commit 751cd1268e
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
3 changed files with 10 additions and 7 deletions

View file

@ -22,6 +22,7 @@ import android.widget.Toast
import androidx.appcompat.widget.SearchView
import androidx.cardview.widget.CardView
import androidx.core.content.PermissionChecker
import androidx.core.content.res.ResourcesCompat
import androidx.core.view.MenuItemCompat
import androidx.preference.PreferenceManager
import autodagger.AutoInjector
@ -34,6 +35,7 @@ import com.nextcloud.talk.application.NextcloudTalkApplication
import com.nextcloud.talk.controllers.base.BaseController
import com.nextcloud.talk.models.json.generic.GenericOverall
import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.DisplayUtils
import com.nextcloud.talk.utils.bundle.BundleKeys
import com.nextcloud.talk.utils.bundle.BundleKeys.KEY_ROOM_TOKEN
import com.nextcloud.talk.utils.database.user.UserUtils
@ -224,8 +226,9 @@ class LocationPickerController(args: Bundle) :
val locationOverlay = MyLocationNewOverlay(GpsMyLocationProvider(context), map)
// locationOverlay.enableFollowLocation()
locationOverlay.enableMyLocation()
// locationOverlay.setPersonIcon(
// DisplayUtils.getBitmap(ResourcesCompat.getDrawable(resources!!, R.drawable.current_location_circle, null)))
locationOverlay.setPersonHotspot(20.0F,20.0F)
locationOverlay.setPersonIcon(
DisplayUtils.getBitmap(ResourcesCompat.getDrawable(resources!!, R.drawable.current_location_circle, null)))
map?.overlays?.add(locationOverlay)
val mapController = map?.controller
@ -237,7 +240,7 @@ class LocationPickerController(args: Bundle) :
}
var myLocation: GeoPoint
myLocation = GeoPoint(13.0, 52.0)
myLocation = GeoPoint(52.0, 13.0)
var zoomToCurrentPositionAllowed = !receivedChosenGeocodingResult
locationOverlay.runOnFirstFix {

View file

@ -4,9 +4,9 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="oval">
<solid android:color="#0039C9"/>
<stroke android:color="#FFFFFF" android:width="0.1dp"/>
<size android:width="6dp" android:height="6dp"/>
<solid android:color="#0082C9"/>
<stroke android:color="#FFFFFF" android:width="2dp"/>
<size android:width="15dp" android:height="15dp"/>
</shape>
</item>
</selector>

View file

@ -48,7 +48,7 @@
android:layout_height="50dp"
android:src="@drawable/ic_baseline_location_on_red_24"
android:layout_centerHorizontal="true"
android:layout_marginBottom="0dp"
android:layout_marginBottom="-10dp"
android:layout_above="@id/locationpicker_anchor"
android:contentDescription="@string/nc_location_current_position_description">
</ImageView>