Skip to content

Commit

Permalink
Merge pull request #53 from orhanobut/oo/size
Browse files Browse the repository at this point in the history
Refactor and improvement
  • Loading branch information
orhanobut committed Jul 12, 2015
2 parents cc480ad + 04b750a commit e1b44c3
Show file tree
Hide file tree
Showing 36 changed files with 1,669 additions and 1,538 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ Simple, easy dialog solution for android.

### Gradle
```groovy
compile 'com.orhanobut:dialogplus:1.7@aar'
compile 'com.orhanobut:dialogplus:1.8@aar'
```

### Usage
Use the builder to create the dialog.

Basic usage
```java
DialogPlus dialog = new DialogPlus.Builder(this)
DialogPlus dialog = DialogPlus.newDialog(this)
.setAdapter(adapter)
.setOnItemClickListener(new OnItemClickListener() {
@Override
Expand All @@ -45,6 +45,10 @@ Enable expand animation same as Android L share dialog
```java
.setExpanded(true) // default is false, only works for grid and list
```
Set expand animation default height
```java
.setExpanded(true, 300)
```

Select different holder.

Expand Down Expand Up @@ -136,9 +140,10 @@ View view = dialogPlus.getHeaderView();
.setInAnimation(R.anim.abc_fade_in)
.setOutAnimation(R.anim.abc_fade_out)
```
- Set screen type to either fill the screen or only half
- Set width and height for the content
```java
.setScreenType(DialogPlus.ScreenType.FULL)
.setContentWidth(ViewGroup.LayoutParams.WRAP_CONTENT) // or any custom width ie: 300
.setContentHeight(ViewGroup.LayoutParams.WRAP_CONTENT)
```

- Dismiss Listener, triggered when the dialog is dismissed
Expand Down
Loading

0 comments on commit e1b44c3

Please sign in to comment.