Skip to content

Commit c96a183

Browse files
committed
Update README.md
Should be putExtra and not putIntExtra
1 parent c06a049 commit c96a183

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Add the following code to your gradle build script.
3232
Simply do the following.
3333
```java
3434
Intent filePickerIntent = new Intent(this, FilePickerActivity.class);
35-
filePickerIntent.putIntExtra(FilePickerActivity.REQUEST_CODE, FilePickerActivity.REQUEST_DIRECTORY);
35+
filePickerIntent.putExtra(FilePickerActivity.REQUEST_CODE, FilePickerActivity.REQUEST_DIRECTORY);
3636
startActivityForResult(filePickerIntent, FilePickerActivity.REQUEST_DIRECTORY);
3737
```
3838
Make sure to add the int extra for your request code. You can also request for a file path instead of a directory. See the javadocs for more info. To get the file path do the following.
@@ -59,8 +59,8 @@ You can change the header background in the activity by adding resorce ids to yo
5959

6060
```java
6161
Intent filePickerIntent = new Intent(this, FilePickerActivity.class);
62-
filePickerIntent.putIntExtra(FilePickerActivity.REQUEST_CODE, FilePickerActivity.REQUEST_DIRECTORY);
63-
filePickerIntent.putIntExtra(FilePickerActivity.INTENT_EXTRA_COLOR_ID, R.color.myColor);
62+
filePickerIntent.putExtra(FilePickerActivity.REQUEST_CODE, FilePickerActivity.REQUEST_DIRECTORY);
63+
filePickerIntent.putExtra(FilePickerActivity.INTENT_EXTRA_COLOR_ID, R.color.myColor);
6464
startActivityForResult(filePickerIntent, FilePickerActivity.REQUEST_DIRECTORY);
6565
```
6666
You can also change the theme for the activity to make it look like a dialog.

0 commit comments

Comments
 (0)