Skip to content

Commit 1b1aec7

Browse files
committed
release versi 1.0.3 dari bg egi10
1 parent b12aa8e commit 1b1aec7

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,51 @@ dependencies {
7474

7575
### SearchViewDialog
7676
Dialog with **1 Title, 1 Content, 1 EditText, 1 RecyclerView, 1 Negative Button, 1 Positive Button**. You can choise `Single Item Select` or `Multi Item Select`. The difference is only in `callback` function.
77+
- **Content Item** there is 3 type of is that you can sent to this dialog.
78+
**Type 1**
79+
```java
80+
String[] arrayString = {"M", "Fadli", "Zein"};
81+
new SearchViewDialog(getSupportFragmentManager())
82+
.setItems(arrayString);
83+
```
84+
**Type 2**
85+
```java
86+
ArrayList<String> listString = new ArrayList<>();
87+
listString.add("Lorem ipsum dolor");
88+
new SearchViewDialog(getSupportFragmentManager())
89+
.setItems(listString);
90+
```
91+
**Type 3** for this type you should override function `toString()` to your `model pojo`
92+
```java
93+
94+
public class ExampleModel {
95+
96+
private int id;
97+
private String name;
98+
private String address;
99+
100+
//constructor
101+
102+
//getter
103+
//setter
104+
105+
@Override
106+
public String toString() {
107+
return "ExampleModel{" +
108+
"id=" + id +
109+
", name='" + name + '\'' +
110+
", address='" + address + '\'' +
111+
'}';
112+
}
113+
}
114+
```
115+
```java
116+
ArrayList<ExampleModel> listObject = new ArrayList<>();
117+
listObject.add(new ExampleModel(1, "Zein", "Balbar"));
118+
new SearchViewDialog(getSupportFragmentManager())
119+
.setItems(listObject);
120+
```
121+
77122
- **Single Item Select**. Use `onOkPressedCallBackSingle` to enable `Multi Select Item`.
78123
**Code** :
79124
```java

0 commit comments

Comments
 (0)