Giter Site home page Giter Site logo

searchpreference's People

Contributors

brayandso avatar bytehamster avatar cketti avatar david-allison avatar joserebelo avatar ov3rk1ll avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

searchpreference's Issues

Improve the search history

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.

Screen_Recording_20220816-072730_AntennaPod.mp4

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.

API change index()

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.

Search sub tree only

When a search is started from a sub screen, only search settings in that part of the preference tree

Configurable shared preferences file

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.

Delete individual search history

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

Screenshot
WhatsApp Image 2023-12-15 at 5 53 37 PM

Highlight preference input located in a subscreen

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

  • When typing text, all preferences are successfuly found and displayed
  • When calling 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~

[BUG] `app:textClearHistory` has no effect

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

Rename onBackPressed

It feels weird to call onBackPressed(). The method should probably be renamed to something like cancelSearch()

java.util.HashMap$HashIterator.nextEntry

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)

Reveal animation

The transition from the search result to the preference screen could be smoother. Some animation?

Handle view state

It'd be nice if the library could take care of saving and restoring the view state

Rework parameter passing

Instead of the filesToIndex and breadcrumbsToIndex arrays, use an array of serializable wrapper objects. This allows to add more arguments easily.

Error when including this library

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.