Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanWenHai committed Nov 15, 2016
2 parents 4e52739 + 26e9391 commit d7e5f72
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# FileSearcher
A simple fileSearcher.

![image](http://i.makeagif.com/media/11-01-2016/BqiRN9.gif)
![image](http://i.makeagif.com/media/11-15-2016/UWYh3x.gif)

## How to
start FileSearcherActivity from our activity,do not forget the keyword.
```java
Intent intent = new Intent(MainActivity.this, FileSearcherActivity.class);
intent.putExtra("keyword",content);
intent.putExtra("keyword",".txt");
//optional------

//intent.putExtra("max",50 * 1024);//size filter
intent.putExtra("min",50 * 1024);
intent.putExtra("theme",R.style.SearchTheme);//set custom theme here


startActivityForResult(intent,REQUEST_CODE);
```
then we deal selected data in onActivityResult
Expand All @@ -20,6 +27,16 @@ then we deal selected data in onActivityResult
}
}
```
## Theme
optional,you can use custom theme.
```xml
<!--extends FileSearcherActivityTheme, override these attributes.-->
<style name="SearchTheme" parent="FileSearcherActivityTheme">
<item name="colorPrimaryDark">#212121</item> <!--status bar color-->
<item name="colorPrimary">#424242</item> <!--toolbar,scroll bar color-->
<item name="colorAccent">#e0e0e0</item> <!-- selected item color-->
</style>
```
## Dependency

Step 1. Add the JitPack repository to your build file
Expand All @@ -35,5 +52,5 @@ Add it in your root build.gradle at the end of repositories:
Step 2. Add the dependency

dependencies {
compile 'com.github.YuanWenHai:FileSearcher:1.2'
compile 'com.github.YuanWenHai:FileSearcher:1.3.1'
}

0 comments on commit d7e5f72

Please sign in to comment.