https://github.com/bytehamster/searchpreference

Search inside Android Preferences

https://github.com/bytehamster/searchpreference

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.2%) to scientific vocabulary

Keywords

android android-library android-settings
Last synced: 5 months ago · JSON representation

Repository

Search inside Android Preferences

Basic Info
  • Host: GitHub
  • Owner: ByteHamster
  • License: mit
  • Language: Java
  • Default Branch: master
  • Size: 1.03 MB
Statistics
  • Stars: 72
  • Watchers: 6
  • Forks: 23
  • Open Issues: 5
  • Releases: 14
Topics
android android-library android-settings
Created almost 8 years ago · Last pushed 10 months ago
Metadata Files
Readme License

README.md

SearchPreference

This is a library for Android apps that allows to search inside Preference xml files. The library provides a subclass of Preference that can be integrated into existing apps easily.

Adding to your app

Add PreferenceSearch to your app/build.gradle:

dependencies {
    implementation 'com.github.ByteHamster:SearchPreference:2.7.0'
}

Add PreferenceSearch to your build.gradle:

allprojects {
    repositories {
        // ...
        maven { url 'https://jitpack.io' }
    }
}

Add search bar to your preferences.xml file:

<com.bytehamster.lib.preferencesearch.SearchPreference
    android:key="searchPreference" />

Define search index in your PreferenceFragment:

public static class PrefsFragment extends PreferenceFragmentCompat {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        addPreferencesFromResource(R.xml.preferences);

        SearchPreference searchPreference = (SearchPreference) findPreference("searchPreference");
        SearchConfiguration config = searchPreference.getSearchConfiguration();
        config.setActivity((AppCompatActivity) getActivity());
        config.index(R.xml.preferences);
    }
}

And react to search results in your Activity:

public class MyActivity extends AppCompatActivity implements SearchPreferenceResultListener {
    private PrefsFragment prefsFragment;

    @Override
    public void onSearchResultClicked(SearchPreferenceResult result) {
        result.closeSearchPage(this);
        result.highlight(prefsFragment);
    }
}

Translations

This library currently contains only a limited number of translations. If you want to translate the texts shown by the library together with your app's other strings, you can override the strings in the preference xml file using attributes like search:textNoResults. Refer to attrs.xml for details. You can also overwrite the strings when constructing the SearchConfiguration object.

Owner

  • Login: ByteHamster
  • Kind: user
  • Location: Germany
  • Company: Karlsruhe Institute of Technology

I'm a PhD student at Karlsruhe Institute of Technology. In my freetime, I maintain AntennaPod and contribute to other projects like K-9 Mail and Baikal Server.

GitHub Events

Total
  • Create event: 10
  • Release event: 6
  • Issues event: 6
  • Watch event: 5
  • Delete event: 1
  • Issue comment event: 15
  • Push event: 13
  • Pull request event: 2
  • Fork event: 3
Last Year
  • Create event: 10
  • Release event: 6
  • Issues event: 6
  • Watch event: 5
  • Delete event: 1
  • Issue comment event: 15
  • Push event: 13
  • Pull request event: 2
  • Fork event: 3

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 136
  • Total Committers: 7
  • Avg Commits per committer: 19.429
  • Development Distribution Score (DDS): 0.088
Past Year
  • Commits: 15
  • Committers: 2
  • Avg Commits per committer: 7.5
  • Development Distribution Score (DDS): 0.067
Top Committers
Name Email Commits
ByteHamster i****o@b****m 124
Brayan Oliveira 6****O 5
cketti ck@c****e 2
David Allison 6****n 2
ov3rk1ll o****r@g****m 1
Sagar 8****0 1
José Rebelo j****o@o****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 27
  • Total pull requests: 14
  • Average time to close issues: 4 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 10
  • Total pull request authors: 8
  • Average comments per issue: 1.07
  • Average comments per pull request: 1.14
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 4
  • Pull requests: 2
  • Average time to close issues: 18 days
  • Average time to close pull requests: 3 days
  • Issue authors: 3
  • Pull request authors: 1
  • Average comments per issue: 3.0
  • Average comments per pull request: 0.5
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ByteHamster (14)
  • david-allison (2)
  • Arthur-Milchior (2)
  • BrayanDSO (2)
  • joserebelo (2)
  • creativetrendsapps (1)
  • RobbWatershed (1)
  • SanjaySargam (1)
  • Zevsus (1)
  • Sagar0-0 (1)
Pull Request Authors
  • BrayanDSO (4)
  • ByteHamster (3)
  • david-allison (2)
  • cketti (2)
  • Sagar0-0 (2)
  • SanjaySargam (1)
  • joserebelo (1)
  • ov3rk1ll (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

app/build.gradle maven
  • androidx.appcompat:appcompat 1.2.0 implementation
  • androidx.cardview:cardview 1.0.0 implementation
  • androidx.preference:preference 1.1.1 implementation
lib/build.gradle maven
  • androidx.appcompat:appcompat 1.2.0 implementation
  • androidx.cardview:cardview 1.0.0 implementation
  • androidx.preference:preference 1.1.1 implementation
  • androidx.recyclerview:recyclerview 1.1.0 implementation
  • org.apache.commons:commons-text 1.3 implementation
.github/workflows/checks.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
build.gradle maven