Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
Version 1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Angad committed Feb 17, 2017
1 parent fb88716 commit a83de0f
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 14 deletions.
34 changes: 34 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# How to become a contributor and submit your own code

## Contributor License Agreements

We'd love to accept your sample apps and patches! Before we can take them, we
have to jump a couple of legal hurdles.

Please fill out either the individual or corporate Contributor License Agreement (CLA).

* If you are an individual writing original source code and you're sure you
own the intellectual property, then you'll need to sign an [individual CLA]
(https://cla.developers.google.com).
* If you work for a company that wants to allow you to contribute your work,
then you'll need to sign a [corporate CLA]
(https://cla.developers.google.com).

Follow either of the two links above to access the appropriate CLA and
instructions for how to sign and return it. Once we receive it, we'll be able to
accept your pull requests.

## Contributing A Patch

1. Submit an issue describing your proposed change to the repo in question.
2. The repo owner will respond to your issue promptly.
3. If your proposed change is accepted, and you haven't already done so, sign a
Contributor License Agreement (see details above).
4. Fork the desired repo, develop and test your code changes.
5. Ensure that your code adheres to the existing style in the sample to which
you are contributing. Refer to the
[Android Code Style Guide]
(https://source.android.com/source/code-style.html) for the
recommended coding standards for this organization.
6. Ensure that your code has an appropriate set of unit tests which all pass.
7. Submit a pull request.
22 changes: 11 additions & 11 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Super Lite Android Library to select files/directories from Device Storage.
[Angad Singh](https://www.github.com/angads25) ([@angads25](https://www.twitter.com/angads25))

### Benchmark:
[![API](https://img.shields.io/badge/API-9%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=9) <a href="http://www.methodscount.com/?lib=com.github.angads25%3Afilepicker%3A1.0.6"><img src="https://img.shields.io/badge/Size-36 KB-e91e63.svg"/></a>
[![API](https://img.shields.io/badge/API-9%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=9) <a href="http://www.methodscount.com/?lib=com.github.angads25%3Afilepicker%3A1.0.9"><img src="https://img.shields.io/badge/Size-36 KB-e91e63.svg"/></a>

### Where to Find:
[ ![Download](https://api.bintray.com/packages/angads25/maven/filepicker/images/download.svg) ](https://bintray.com/angads25/maven/filepicker/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.angads25/filepicker/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.angads25/filepicker) [![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-FilePicker-blue.svg?style=flat)](http://android-arsenal.com/details/1/3950)
Expand All @@ -23,28 +23,28 @@ Super Lite Android Library to select files/directories from Device Storage.

* Library is also Available in MavenCentral, So just put this in your app dependencies to use it:
```gradle
compile 'com.github.angads25:filepicker:1.0.8'
compile 'com.github.angads25:filepicker:1.0.9'
```

### Usage
## FilePickerDialog
1. Start by creating an instance of `DialogProperties`.

```java
DialogProperties properties=new DialogProperties();
DialogProperties properties = new DialogProperties();
```

Now 'DialogProperties' has certain parameters.

2. Assign values to each Dialog Property using `DialogConfig` class.

```java
properties.selection_mode=DialogConfigs.SINGLE_MODE;
properties.selection_type=DialogConfigs.FILE_SELECT;
properties.root=new File(DialogConfigs.DEFAULT_DIR);
properties.error_dir=new File(DialogConfigs.DEFAULT_DIR);
properties.offset=new File(DialogConfigs.DEFAULT_DIR);
properties.extensions=null;
properties.selection_mode = DialogConfigs.SINGLE_MODE;
properties.selection_type = DialogConfigs.FILE_SELECT;
properties.root = new File(DialogConfigs.DEFAULT_DIR);
properties.error_dir = new File(DialogConfigs.DEFAULT_DIR);
properties.offset = new File(DialogConfigs.DEFAULT_DIR);
properties.extensions = null;
```

3. Next create an instance of `FilePickerDialog`, and pass `Context` and `DialogProperties` references as parameters. Optional: You can change the title of dialog. Default is current directory name. Set the positive button string. Default is Select. Set the negative button string. Defalut is Cancel.
Expand Down Expand Up @@ -91,7 +91,7 @@ Marshmallow and above requests for the permission on runtime. You should overrid
}
```

That's It. You are good to go further.
That's It. You are good to proceed further.

###FilePickerPreference

Expand Down Expand Up @@ -141,7 +141,7 @@ Marshmallow and above requests for the permission on runtime. You should overrid
That's It. You are good to move further.

###Important:
* `defaultValue`, `error_dir`, `root_dir` must have valid directory/file paths.
* `defaultValue`, `error_dir`, `root_dir`, `offset_dir` must have valid directory/file paths.
* `defaultValue` paths should end with ':'.
* `defaultValue` can have multiple paths, there should be a ':' between two paths.
* `extensions` must not have '.'.
Expand Down
2 changes: 1 addition & 1 deletion filepicker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ext {
siteUrl = 'https://github.com/angads25/android-filepicker'
gitUrl = 'https://github.com/angads25/android-filepicker.git'

libraryVersion = '1.0.8'
libraryVersion = '1.0.9'

developerId = 'angads25'
developerName = 'Angad Singh'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ else if (attr == R.styleable.FilePickerPreference_error_dir) {
}
}
else if (attr == R.styleable.FilePickerPreference_offset) {
String offset_dir=tarr.getString(R.styleable.FilePickerPreference_offset);
String offset_dir=tarr.getString(R.styleable.FilePickerPreference_offset_dir);
if(offset_dir!=null&&!offset_dir.equals(""))
{ properties.offset=new File(offset_dir);
}
Expand Down
2 changes: 1 addition & 1 deletion filepicker/src/main/res/values/attrs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
format="string"/>

<attr
name="offset"
name="offset_dir"
format="string"/>

<attr
Expand Down

0 comments on commit a83de0f

Please sign in to comment.