Skip to content

Commit

Permalink
Change- README.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
hsmnzaydn committed Nov 20, 2018
1 parent 6abda5e commit ef0d7a9
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 45 deletions.
6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

111 changes: 66 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,65 +1,86 @@
# easy-csv
Creates csv file for Android

## Download
# easy-csv

Creates csv file for android



## Download

**Add it in your root build.gradle at the end of repositories:**

<pre>

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

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

</pre>



**Add the dependency**

<pre>

dependencies {
implementation 'com.github.hsmnzaydn:easy-csv:1.0.0'
implementation 'com.github.hsmnzaydn:easy-csv:1.0.0'
}

</pre>

## Use Steps


## Use Steps

**Step 1: Create EasyCsv Object**

``` java
EasyCsv easyCsv = new EasyCsv(MainActivity.this);
```

``` java

EasyCsv easyCsv = new EasyCsv(MainActivity.this);

```



**Step 2: Create your headerlist and datalist**

``` java
List<String> headerList = new ArrayList<>();
headerList.add("Name.Surname.Age-");

List<String> dataList = new ArrayList<>();
dataList.add("Serkan.Ozaydin.23-");
```

``` java
List<String> headerList = new ArrayList<>();
headerList.add("Name.Surname.Age-");

List<String> dataList = new ArrayList<>();
dataList.add("Serkan.Ozaydin.23-");

```

**Step 3: Select separators for column and line**

``` java
easyCsv.setSeparatorColumn(".");
easyCsv.setSeperatorLine("-");
```

``` java
easyCsv.setSeparatorColumn(".");
easyCsv.setSeperatorLine("-");
```

**Step 4: Select separators for column and line**


``` java
/**
*
* @param fileName Name of the file to be created
* @param WRITE_PERMISSON_REQUEST_CODE EasyCsv request runtime permission for Write permission to user. When user "Accept" or "Decline" for you can handler
*/
easyCsv.createCsvFile(fileName, headerList, dataList WRITE_PERMISSON_REQUEST_CODE, new FileCallback() {
@Override
public void onSuccess(File file) {
}
@Override
public void onFail(String err) {
}
});
```


``` java

/**
* @param fileName Name of the file to be created
* @param WRITE_PERMISSON_REQUEST_CODE EasyCsv request runtime permission for Write permission to user. When user "Accept" or "Decline" for you can handler
*/
easyCsv.createCsvFile(fileName, headerList, dataList WRITE_PERMISSON_REQUEST_CODE, new FileCallback() {
@Override
public void onSuccess(File file) {
}

@Override
public void onFail(String err) {
}
});

```

0 comments on commit ef0d7a9

Please sign in to comment.