Quellcode durchsuchen

polish location search result items

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger vor 3 Jahren
Ursprung
Commit
31d585e763

+ 34 - 0
app/src/main/res/drawable-night/ic_circular_location.xml

@@ -0,0 +1,34 @@
+<!--
+  ~ Nextcloud Talk application
+  ~
+  ~ @author Andy Scherzinger
+  ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
+  ~
+  ~ This program is free software: you can redistribute it and/or modify
+  ~ it under the terms of the GNU General Public License as published by
+  ~ the Free Software Foundation, either version 3 of the License, or
+  ~ at your option) any later version.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  ~ GNU General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:fillColor="#2C2C2C"
+      android:fillType="nonZero"
+      android:pathData="M12,0C5.4168,0 0,5.4168 0,12C0,18.5832 5.4168,24 12,24C18.5832,24 24,18.5832 24,12C24,5.4168 18.5832,0 12,0Z" />
+  <path
+      android:fillColor="#ffffff"
+      android:fillType="nonZero"
+      android:pathData="M12,11.6989C11.1743,11.6989 10.4943,11.0189 10.4943,10.1932C10.4943,9.3675 11.1743,8.6875 12,8.6875C12.8257,8.6875 13.5057,9.3675 13.5057,10.1932C13.5057,11.0189 12.8257,11.6989 12,11.6989M12,5.9774C9.6873,5.9774 7.7842,7.8805 7.7842,10.1932C7.7842,13.3551 12,18.0226 12,18.0226C12,18.0226 16.2158,13.3551 16.2158,10.1932C16.2158,7.8805 14.3127,5.9774 12,5.9774Z" />
+</vector>

+ 34 - 0
app/src/main/res/drawable/ic_circular_location.xml

@@ -0,0 +1,34 @@
+<!--
+  ~ Nextcloud Talk application
+  ~
+  ~ @author Andy Scherzinger
+  ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
+  ~
+  ~ This program is free software: you can redistribute it and/or modify
+  ~ it under the terms of the GNU General Public License as published by
+  ~ the Free Software Foundation, either version 3 of the License, or
+  ~ at your option) any later version.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  ~ GNU General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  -->
+
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24"
+    android:viewportHeight="24">
+  <path
+      android:fillColor="#DBDBDB"
+      android:fillType="nonZero"
+      android:pathData="M12,0C5.4168,0 0,5.4168 0,12C0,18.5832 5.4168,24 12,24C18.5832,24 24,18.5832 24,12C24,5.4168 18.5832,0 12,0Z" />
+  <path
+      android:fillColor="#ffffff"
+      android:fillType="nonZero"
+      android:pathData="M12,11.6989C11.1743,11.6989 10.4943,11.0189 10.4943,10.1932C10.4943,9.3675 11.1743,8.6875 12,8.6875C12.8257,8.6875 13.5057,9.3675 13.5057,10.1932C13.5057,11.0189 12.8257,11.6989 12,11.6989M12,5.9774C9.6873,5.9774 7.7842,7.8805 7.7842,10.1932C7.7842,13.3551 12,18.0226 12,18.0226C12,18.0226 16.2158,13.3551 16.2158,10.1932C16.2158,7.8805 14.3127,5.9774 12,5.9774Z" />
+</vector>

+ 41 - 8
app/src/main/res/layout/geocoding_item.xml

@@ -1,23 +1,56 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!--
+  ~ Nextcloud Talk application
+  ~
+  ~ @author Marcel Hibbe
+  ~ @author Andy Scherzinger
+  ~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
+  ~ Copyright (C) 2021 Marcel Hibbe <dev@mhibbe.de>
+  ~
+  ~ This program is free software: you can redistribute it and/or modify
+  ~ it under the terms of the GNU General Public License as published by
+  ~ the Free Software Foundation, either version 3 of the License, or
+  ~ at your option) any later version.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  ~ GNU General Public License for more details.
+  ~
+  ~ You should have received a copy of the GNU General Public License
+  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
+  -->
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
-    android:orientation="horizontal">
+    android:minHeight="56dp"
+    android:orientation="horizontal"
+    tools:ignore="UseCompoundDrawables">
 
     <ImageView
         android:id="@+id/roundedImageView"
-        android:layout_width="40dp"
-        android:layout_height="40dp"
-        android:src="@drawable/ic_baseline_location_on_24"
-        android:layout_gravity="center" />
+        android:layout_width="@dimen/avatar_size"
+        android:layout_height="@dimen/avatar_size"
+        android:layout_gravity="top"
+        android:layout_marginTop="@dimen/standard_margin"
+        android:layout_marginStart="@dimen/standard_half_margin"
+        android:layout_marginEnd="@dimen/standard_double_padding"
+        android:layout_marginBottom="@dimen/standard_margin"
+        android:contentDescription="@null"
+        android:src="@drawable/ic_circular_location" />
 
     <TextView
         android:id="@+id/name"
-        android:layout_width="wrap_content"
+        android:layout_width="match_parent"
         android:layout_height="wrap_content"
+        android:layout_gravity="top"
+        android:textColor="@color/high_emphasis_text"
         android:textSize="@dimen/geocoding_result_text_size"
-        android:layout_gravity="center"
-        tools:text="Brandenburg, Germany"/>
+        android:paddingTop="12dp"
+        android:paddingBottom="@dimen/standard_padding"
+        android:paddingStart="@dimen/standard_half_padding"
+        android:paddingEnd="@dimen/standard_padding"
+        tools:text="S Sonnenallee, 50, Saalestraße, Rixdorf, Neukölln, Berlin, 12055, Deutschland" />
 
 </LinearLayout>

+ 1 - 0
app/src/main/res/values/dimens.xml

@@ -52,6 +52,7 @@
     <dimen name="standard_double_margin">32dp</dimen>
     <dimen name="empty_list_icon_layout_width">72dp</dimen>
     <dimen name="empty_list_icon_layout_height">72dp</dimen>
+    <dimen name="standard_double_padding">32dp</dimen>
     <dimen name="standard_padding">16dp</dimen>
     <dimen name="standard_half_padding">8dp</dimen>
     <dimen name="standard_half_margin">8dp</dimen>

+ 10 - 0
drawable_resources/other/circular_location.svg

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg width="100%" height="100%" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
+    <g transform="matrix(1.2,0,0,1.2,-2.4,-2.4)">
+        <path d="M12,2C6.514,2 2,6.514 2,12C2,17.486 6.514,22 12,22C17.486,22 22,17.486 22,12C22,6.514 17.486,2 12,2Z" style="fill-rule:nonzero;"/>
+    </g>
+    <g transform="matrix(0.602263,0,0,0.602263,4.77284,4.77284)">
+        <path d="M12,11.5C10.629,11.5 9.5,10.371 9.5,9C9.5,7.629 10.629,6.5 12,6.5C13.371,6.5 14.5,7.629 14.5,9C14.5,10.371 13.371,11.5 12,11.5M12,2C8.16,2 5,5.16 5,9C5,14.25 12,22 12,22C12,22 19,14.25 19,9C19,5.16 15.84,2 12,2Z" style="fill:white;fill-rule:nonzero;"/>
+    </g>
+</svg>