diff --git a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt
index 8d83c1f771..42deb79742 100644
--- a/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt
+++ b/app/src/main/java/info/nightscout/androidaps/activities/PreferencesActivity.kt
@@ -33,6 +33,10 @@ class PreferencesActivity : NoSplashAppCompatActivity(), PreferenceFragmentCompa
override fun afterTextChanged(s: Editable) {}
})
+ pref_filter_clear.setOnClickListener() {
+ pref_filter.setText("");
+ }
+
title = resourceHelper.gs(R.string.nav_preferences)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
supportActionBar?.setDisplayShowHomeEnabled(true)
diff --git a/app/src/main/res/layout/activity_preferences.xml b/app/src/main/res/layout/activity_preferences.xml
index c5c51650d6..042c7515b2 100644
--- a/app/src/main/res/layout/activity_preferences.xml
+++ b/app/src/main/res/layout/activity_preferences.xml
@@ -1,7 +1,6 @@
@@ -16,15 +15,28 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
+ android:layout_marginEnd="10dp"
+ android:layout_gravity="center_vertical"
android:text="@string/filter"
android:textAppearance="@android:style/TextAppearance.Material.Medium"
android:textStyle="bold" />
+ android:layout_weight="1"
+ android:layout_gravity="center_vertical"
+ android:inputType="text" />
+
+
@@ -36,7 +48,7 @@
+ android:layout_height="wrap_content">