From 2154b6cf944ed52de2839a25a515e06ea8bddd55 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Tue, 8 Jun 2021 12:01:31 +0200 Subject: [PATCH] improve design of share location button / location description Signed-off-by: Marcel Hibbe --- .../controllers/LocationPickerController.kt | 3 +++ .../main/res/layout/controller_location.xml | 27 +++++++++++-------- app/src/main/res/values/strings.xml | 1 + 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/LocationPickerController.kt b/app/src/main/java/com/nextcloud/talk/controllers/LocationPickerController.kt index b9767b7d7..83bcaab46 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/LocationPickerController.kt +++ b/app/src/main/java/com/nextcloud/talk/controllers/LocationPickerController.kt @@ -289,14 +289,17 @@ class LocationPickerController(args: Bundle) : when { isGpsLocation -> { shareLocationDescription?.text = context!!.getText(R.string.nc_share_current_location) + placeName?.visibility = View.GONE placeName?.text = "" } isGeocodedResult -> { shareLocationDescription?.text = context!!.getText(R.string.nc_share_this_location) + placeName?.visibility = View.VISIBLE placeName?.text = geocodedName } else -> { shareLocationDescription?.text = context!!.getText(R.string.nc_share_this_location) + placeName?.visibility = View.GONE placeName?.text = "" } } diff --git a/app/src/main/res/layout/controller_location.xml b/app/src/main/res/layout/controller_location.xml index 4c7824cac..b0dd42365 100644 --- a/app/src/main/res/layout/controller_location.xml +++ b/app/src/main/res/layout/controller_location.xml @@ -2,6 +2,7 @@ + android:contentDescription="@string/nc_location_current_position_description"> + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:layout_gravity="center_vertical"> + android:layout_height="0dp" + android:layout_weight="1" + android:textSize="20sp" + tools:text="Share this location"> + android:layout_height="0dp" + android:layout_weight="1" + android:ellipsize="end" + android:maxLines="1" + tools:text="Brandenburg, Germany"> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b8ec27e81..8fc62aa8a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -378,6 +378,7 @@ location permission is required Share current location Share this location + Your current location phone_book_integration