aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-13 01:46:16 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-13 01:46:16 -0600
commit9a2b7b2b5ea3baa4812f9a37aabf80038c00f9c7 (patch)
treea34ed3db9f9786924c45aff5df812b4ed9e4afea /androidApp/src/main/java/mx/trackermap
parent561f3e19b6fbcfcca3fd568dde8793d9fbfd0aa5 (diff)
downloadetbsa-trackermap-mobile-9a2b7b2b5ea3baa4812f9a37aabf80038c00f9c7.tar.gz
etbsa-trackermap-mobile-9a2b7b2b5ea3baa4812f9a37aabf80038c00f9c7.tar.bz2
etbsa-trackermap-mobile-9a2b7b2b5ea3baa4812f9a37aabf80038c00f9c7.zip
Made search filter cleanable
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt8
1 files changed, 8 insertions, 0 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt
index 5a9f9ad..24d0e4b 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/units/UnitsActivity.kt
@@ -6,6 +6,7 @@ import android.util.Log
import android.view.View
import androidx.appcompat.app.AppCompatActivity
import androidx.appcompat.widget.PopupMenu
+import androidx.core.content.ContextCompat
import androidx.core.widget.doAfterTextChanged
import androidx.fragment.app.commit
import kotlinx.coroutines.DelicateCoroutinesApi
@@ -69,6 +70,13 @@ class UnitsActivity : AppCompatActivity() {
}
binding.searchInput.doAfterTextChanged {
Log.d("UnitsActivity", "Search changed to ${it.toString()}")
+ /*binding.searchInput.setCompoundDrawablesRelativeWithIntrinsicBounds(
+ null, null,
+ if (it?.isEmpty() == true) null
+ else ContextCompat.getDrawable(this, R.drawable.icon_back),
+ null,
+ )*/
+ binding.searchInput
unitsViewModel.search(it.toString())
}
}