Skip to content

Commit 77168d3

Browse files
committed
Update README.md
1 parent 163346e commit 77168d3

File tree

1 file changed

+40
-17
lines changed

1 file changed

+40
-17
lines changed

README.md

+40-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
dialogplus
1+
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-dialogplus-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1413)
2+
3+
DialogPlus
24
==========
35

46
Simple,easy dialog for android. Instead of using dialog/fragments, normal view will be shown as dialog. It's customizable and have 3 different content holder.
@@ -13,7 +15,7 @@ repositories {
1315
maven { url "https://oss.sonatype.org/content/repositories/snapshots/"}
1416
}
1517
dependencies {
16-
compile 'com.orhanobut:dialogplus:1.0.0-SNAPSHOT@aar'
18+
compile 'com.orhanobut:dialogplus:1.1-SNAPSHOT@aar'
1719
}
1820
```
1921

@@ -25,20 +27,20 @@ Basic default usage
2527
ArrayAdapter<String> adapter = new ArrayAdapter<>(
2628
this, R.layout.simple_list_item_1, new String[]{"Item 1", "Item 2","Item 3","Item 4"}
2729
);
28-
final DialogPlus dialog = new DialogPlus.Builder(this)
29-
.setHolder(new ListHolder()) // Optional, default:BasicHolder
30-
.setHeader(R.layout.header) // Optional
31-
.setFooter(R.layout.footer) // Optional
32-
.setCancelable(true) // Optional default:true
33-
.setGravity(Gravity.BOTTOM) // Optional default:true
34-
.setAdapter(adapter) // This must be called, Any adapter can be set.
35-
.setOnItemClickListener(new OnItemClickListener() {
36-
@Override
37-
public void onItemClick(Object item, View view, int position) {
38-
//todo
39-
}
40-
})
41-
.create();
30+
DialogPlus dialog = new DialogPlus.Builder(this)
31+
.setHolder(new ListHolder()) // Optional, default:BasicHolder
32+
.setHeader(R.layout.header) // Optional
33+
.setFooter(R.layout.footer) // Optional
34+
.setCancelable(true) // Optional default:true
35+
.setGravity(Gravity.BOTTOM) // Optional default:true
36+
.setAdapter(adapter) // This must be called, Any adapter can be set.
37+
.setOnItemClickListener(new OnItemClickListener() {
38+
@Override
39+
public void onItemClick(DialogPlus dialog, Object item, View view, int position) {
40+
//todo
41+
}
42+
})
43+
.create();
4244
dialog.show();
4345
```
4446

@@ -52,10 +54,31 @@ setHolder(new ListHolder())
5254

5355
- Use BasicHolder as content holder, BasicHolder is basically a listview mockup implementation by using linearlayout, there is no scrollable feature in this view and this should be used if you have only a few items.
5456
```java
55-
setHolder(new ListHolder())
57+
setHolder(new BasicHolder())
5658
```
5759

5860
- Use GridHolder if you want to use GridView for the dialog. You must set column number.
5961
```java
6062
setHolder(new GridHolder(COLUMN_NUMBER))
6163
```
64+
65+
66+
#### TODO
67+
Check wiki
68+
69+
#### License
70+
<pre>
71+
Copyright 2014 Orhan Obut
72+
73+
Licensed under the Apache License, Version 2.0 (the "License");
74+
you may not use this file except in compliance with the License.
75+
You may obtain a copy of the License at
76+
77+
http://www.apache.org/licenses/LICENSE-2.0
78+
79+
Unless required by applicable law or agreed to in writing, software
80+
distributed under the License is distributed on an "AS IS" BASIS,
81+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
82+
See the License for the specific language governing permissions and
83+
limitations under the License.
84+
</pre>

0 commit comments

Comments
 (0)