mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 12:09:45 +01:00
improve design of share location button / location description
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
9ffd5a7579
commit
2154b6cf94
@ -289,14 +289,17 @@ class LocationPickerController(args: Bundle) :
|
|||||||
when {
|
when {
|
||||||
isGpsLocation -> {
|
isGpsLocation -> {
|
||||||
shareLocationDescription?.text = context!!.getText(R.string.nc_share_current_location)
|
shareLocationDescription?.text = context!!.getText(R.string.nc_share_current_location)
|
||||||
|
placeName?.visibility = View.GONE
|
||||||
placeName?.text = ""
|
placeName?.text = ""
|
||||||
}
|
}
|
||||||
isGeocodedResult -> {
|
isGeocodedResult -> {
|
||||||
shareLocationDescription?.text = context!!.getText(R.string.nc_share_this_location)
|
shareLocationDescription?.text = context!!.getText(R.string.nc_share_this_location)
|
||||||
|
placeName?.visibility = View.VISIBLE
|
||||||
placeName?.text = geocodedName
|
placeName?.text = geocodedName
|
||||||
}
|
}
|
||||||
else -> {
|
else -> {
|
||||||
shareLocationDescription?.text = context!!.getText(R.string.nc_share_this_location)
|
shareLocationDescription?.text = context!!.getText(R.string.nc_share_this_location)
|
||||||
|
placeName?.visibility = View.GONE
|
||||||
placeName?.text = ""
|
placeName?.text = ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:id="@+id/parent_container"
|
android:id="@+id/parent_container"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@ -49,14 +50,14 @@
|
|||||||
android:layout_centerHorizontal="true"
|
android:layout_centerHorizontal="true"
|
||||||
android:layout_marginBottom="0dp"
|
android:layout_marginBottom="0dp"
|
||||||
android:layout_above="@id/locationpicker_anchor"
|
android:layout_above="@id/locationpicker_anchor"
|
||||||
android:contentDescription="your location">
|
android:contentDescription="@string/nc_location_current_position_description">
|
||||||
</ImageView>
|
</ImageView>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/share_location"
|
android:id="@+id/share_location"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="70dp"
|
android:layout_height="60dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
@ -69,22 +70,26 @@
|
|||||||
app:srcCompat="@drawable/ic_baseline_location_on_24">
|
app:srcCompat="@drawable/ic_baseline_location_on_24">
|
||||||
</ImageView>
|
</ImageView>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
android:layout_gravity="center_vertical">
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/share_location_description"
|
android:id="@+id/share_location_description"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:textSize="20dp"
|
android:layout_weight="1"
|
||||||
android:layout_marginTop="10dp"
|
android:textSize="20sp"
|
||||||
android:gravity="center_vertical">
|
tools:text="Share this location">
|
||||||
</TextView>
|
</TextView>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/place_name"
|
android:id="@+id/place_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="0dp"
|
||||||
android:gravity="center_vertical">
|
android:layout_weight="1"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:maxLines="1"
|
||||||
|
tools:text="Brandenburg, Germany">
|
||||||
</TextView>
|
</TextView>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -378,6 +378,7 @@
|
|||||||
<string name="nc_location_permission_required">location permission is required</string>
|
<string name="nc_location_permission_required">location permission is required</string>
|
||||||
<string name="nc_share_current_location">Share current location</string>
|
<string name="nc_share_current_location">Share current location</string>
|
||||||
<string name="nc_share_this_location">Share this location</string>
|
<string name="nc_share_this_location">Share this location</string>
|
||||||
|
<string name="nc_location_current_position_description">Your current location</string>
|
||||||
|
|
||||||
<!-- Phonebook Integration -->
|
<!-- Phonebook Integration -->
|
||||||
<string name="nc_settings_phone_book_integration_key" translatable="false">phone_book_integration</string>
|
<string name="nc_settings_phone_book_integration_key" translatable="false">phone_book_integration</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user