bytehamster / searchpreference Goto Github PK
View Code? Open in Web Editor NEWSearch inside Android Preferences
License: MIT License
Search inside Android Preferences
License: MIT License
Currently I'm avoiding to use the search history option on AnkiDroid because the saved history tends to have only insipid results.
Just as an example, taken on AntennaPod actually (I use it too, quite great app, thank you), instead of saving the last clicked items, i.e. Select themes
and App notifications
, it just saves s
and a
, which IMHO doesn't help much.
If it saved the last opened results with their full names it would be more useful IMO
I'd be willing to do a PR for it, and possibly make it the default history behavior (open to discussion), if that's fine with you.
When tapping on the 4dp of padding, you see a ripple effect. Does not cause harm but might be confusing.
Instead of calling index().addBreadcrumb().addFile()
, it would be more clear to call addFile().withBreadcrumb().commit()
. Otherwise you could add multiple files in one index call.
When a search is started from a sub screen, only search settings in that part of the preference tree
Upload to Maven Central or Jcenter
Hi,
I was looking into integrating this lib into Gadgetbridge. However, we have different preference screens per device, with completely unrelated preferences / histories.
It would be nice to be able to configure a separate history per screen.
Looking at the code, it should be as simple as adding a configurable identifier for the history key (or a configurable shared prefs file) - not sure which one would be preferable. I'd be willing to open a PR with the changes, if this is something that would be desirable.
Is your feature request related to a problem? Please describe.
Currently, we can delete all search history at once. There is no option to delete a particular search history individually
Describe the solution you'd like
Show a dialog box on clicking on a particular search history where user can delete it individually
Heya,
My app's preferences XML has 780 lines. As I can't possibly show them all on the same screen, they're organized by subscreens, using the PreferenceScreen
tag (see https://github.com/avluis/Hentoid/blob/master/app/src/main/res/xml/preferences.xml).
I'd like to display your library's search text input on the root screen, where there's just the list of all subscreens.
With v2.4.0
result.highlight(fragment)
from the activity, it doesn't manage to reach the proper subscreen to show the preference input.=> Would that be possible to adapt the library so that it can highlight inputs inside subscreens?
Thanks in advance~
Calling setOnActionExpandListener() seems like something the library could be doing for us
Repro case:
Index: app/src/main/res/xml/preferences.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/res/xml/preferences.xml b/app/src/main/res/xml/preferences.xml
--- a/app/src/main/res/xml/preferences.xml (revision 856ae2ca7f5a955dfb0eb7834319d159c269fba0)
+++ b/app/src/main/res/xml/preferences.xml (date 1707366854942)
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
-<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:app="http://schemas.android.com/apk/res-auto">
<com.bytehamster.lib.preferencesearch.SearchPreference
+ app:textClearHistory="AA"
android:key="searchPreference" />
<CheckBoxPreference
Apparently there is an error with v2.2.0 build on jitpack, which means I can't add it on my build.gradle
file
Here's the log https://jitpack.io/com/github/ByteHamster/SearchPreference/v2.2.0/build.log
As I don't know if there is something I can do to help, I'm creating the issue.
It feels weird to call onBackPressed(). The method should probably be renamed to something like cancelSearch()
Fatal Exception: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry + 795(HashMap.java:795)
at java.util.HashMap$KeyIterator.next + 822(HashMap.java:822)
at com.android.internal.util.XmlUtils.writeSetXml + 302(XmlUtils.java:302)
at com.android.internal.util.XmlUtils.writeValueXml + 451(XmlUtils.java:451)
at com.android.internal.util.XmlUtils.writeMapXml + 245(XmlUtils.java:245)
at com.android.internal.util.XmlUtils.writeMapXml + 185(XmlUtils.java:185)
at android.app.SharedPreferencesImpl.writeToFile + 598(SharedPreferencesImpl.java:598)
at android.app.SharedPreferencesImpl.access$800 + 52(SharedPreferencesImpl.java:52)
at android.app.SharedPreferencesImpl$2.run + 513(SharedPreferencesImpl.java:513)
at java.util.concurrent.ThreadPoolExecutor.runWorker + 1080(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run + 573(ThreadPoolExecutor.java:573)
at java.lang.Thread.run + 838(Thread.java:838)
The transition from the search result to the preference screen could be smoother. Some animation?
It'd be nice if the library could take care of saving and restoring the view state
Instead of the filesToIndex
and breadcrumbsToIndex
arrays, use an array of serializable wrapper objects. This allows to add more arguments easily.
Android dependency 'com.android.support:preference-v7' has different version for the compile (26.1.0) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.