Bimba.git

commit 5d029c3915c5561fa70da7501930a6d58b8ce8c0

Author: Adam Pioterek <adam.pioterek@protonmail.ch>

searchbar text handles

%!v(PANIC=String method: strings: negative Repeat count)


diff --git a/app/src/main/java/ml/adamsprogs/bimba/models/adapters/SuggestionsAdapter.kt b/app/src/main/java/ml/adamsprogs/bimba/models/adapters/SuggestionsAdapter.kt
index 4769220894b85cb69b1596ece78cf47291d1e34b..4f3a969d6d688d1db3201aa44f9d942b9fa0a743 100644
--- a/app/src/main/java/ml/adamsprogs/bimba/models/adapters/SuggestionsAdapter.kt
+++ b/app/src/main/java/ml/adamsprogs/bimba/models/adapters/SuggestionsAdapter.kt
@@ -4,15 +4,20 @@ import android.content.Context
 import android.graphics.PorterDuff
 import android.os.Build
 import android.text.Html
-import android.view.*
-import android.widget.*
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.ImageView
+import android.widget.TextView
 import androidx.core.content.ContextCompat.getColor
 import ml.adamsprogs.bimba.R
 import ml.adamsprogs.bimba.getDrawable
-import com.mancj.materialsearchbar.adapter.SuggestionsAdapter as SearchBarSuggestionsAdapter
 import ml.adamsprogs.bimba.models.suggestions.GtfsSuggestion
 import ml.adamsprogs.bimba.models.suggestions.LineSuggestion
 import ml.adamsprogs.bimba.models.suggestions.StopSuggestion
+import com.mancj.materialsearchbar.adapter.SuggestionsAdapter as SearchBarSuggestionsAdapter
+
+// todo on click ripple
 
 class SuggestionsAdapter(inflater: LayoutInflater, private val onSuggestionClickListener: OnSuggestionClickListener, private val context: Context) :
         SearchBarSuggestionsAdapter<GtfsSuggestion, SuggestionsAdapter.ViewHolder>(inflater) {




diff --git a/app/src/main/res/drawable/ic_texthandle_end.xml b/app/src/main/res/drawable/ic_texthandle_end.xml
new file mode 100644
index 0000000000000000000000000000000000000000..923f2b49a542f61b7fa1b19c720cba506b6767fb
--- /dev/null
+++ b/app/src/main/res/drawable/ic_texthandle_end.xml
@@ -0,0 +1,8 @@
+<vector android:autoMirrored="true" android:height="24dp"
+    android:viewportHeight="88" android:viewportWidth="176"
+    android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha="1" android:fillColor="#54af39"
+        android:pathData="M88,0A44,44 0,0 1,132 44,44 44,0 0,1 88,88 44,44 0,0 1,44 44V0Z"
+        android:strokeAlpha="1" android:strokeColor="#00000000"
+        android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="0.01982322"/>
+</vector>




diff --git a/app/src/main/res/drawable/ic_texthandle_middle.xml b/app/src/main/res/drawable/ic_texthandle_middle.xml
new file mode 100644
index 0000000000000000000000000000000000000000..da3c7962d98b2e2ef0113080f7491bad6e6c6dc6
--- /dev/null
+++ b/app/src/main/res/drawable/ic_texthandle_middle.xml
@@ -0,0 +1,7 @@
+<vector android:height="24dp" android:viewportHeight="88"
+    android:viewportWidth="88" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha="1" android:fillColor="#54af39"
+        android:pathData="m69.7747,25.7746a36.4509,36.4508 0,0 1,0 51.5492,36.4509 36.4508,0 0,1 -51.5494,0 36.4509,36.4508 0,0 1,0 -51.5492L44,0Z"
+        android:strokeAlpha="1" android:strokeColor="#00000000"
+        android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="0.01642212"/>
+</vector>




diff --git a/app/src/main/res/drawable/ic_texthandle_start.xml b/app/src/main/res/drawable/ic_texthandle_start.xml
new file mode 100644
index 0000000000000000000000000000000000000000..577a11d14e6d46dade232eca4176dbcf8f469879
--- /dev/null
+++ b/app/src/main/res/drawable/ic_texthandle_start.xml
@@ -0,0 +1,8 @@
+<vector android:autoMirrored="true" android:height="24dp"
+    android:viewportHeight="88" android:viewportWidth="176"
+    android:width="48dp" xmlns:android="http://schemas.android.com/apk/res/android">
+    <path android:fillAlpha="1" android:fillColor="#54af39"
+        android:pathData="M88,0A44,44 0,0 0,44 44,44 44,0 0,0 88,88 44,44 0,0 0,132 44V0Z"
+        android:strokeAlpha="1" android:strokeColor="#00000000"
+        android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="0.01982322"/>
+</vector>




diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 321823a1de36e036af6fc66617b149638df0ba60..07853229e13da30362e58a0e22f30edd3ebd36c3 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -17,6 +17,8 @@