1717
1818---
1919
20- ### Feature List
21- - [x] [ Single Select] ( #searchviewdialog )
22- - [x] [ Multi Select] ( #searchviewdialog )
23- - [x] [ Filter] ( #searchviewdialog )
24-
25- ---
26-
27- ### Tech stack and 3rd library
28- - Material.io ([ docs] ( https://material.io/develop/android/docs/getting-started ) )
29- - Multi and Single Selection in Recyclerview ([ docs] ( https://medium.com/@maydin/multi-and-single-selection-in-recyclerview-d29587a7dee2 ) ) ([ example] ( https://github.com/gzeinnumer/MultiandSingleSelectioninRecyclerView ) )
30- - DialogFragment ([ docs] ( https://developer.android.com/reference/android/app/DialogFragment ) )
31-
32- ---
33-
3420## Download
35- Minimum Android SDK Version 21
36-
37- #### Gradle
38- ** Step 1.** add maven ` jitpack.io ` to your ` build.gradle ` (Project) :
21+ Add maven ` jitpack.io ` and ` dependencies ` in ` build.gradle (Project) ` :
3922``` gradle
23+ // build.gradle project
4024allprojects {
4125 repositories {
42- google()
43- jcenter()
26+ ...
4427 maven { url 'https://jitpack.io' }
4528 }
4629}
47- ```
4830
49- ** Step 2.** add dependensi to your ` build.gradle ` (Module) :
50- ``` gradle
31+ // build.gradle app/module
5132dependencies {
52- implementation 'com.github.gzeinnumer:MyLibDialogSearchView:versi'
33+ ...
34+ implementation 'com.github.gzeinnumer:MyLibDialogSearchView:version'
5335 implementation 'com.google.android.material:material:1.2.0'
5436}
5537```
5638
57- ---
58-
59- ** First Step** . Use ` MaterialComponents ` in your style :
39+ ## Feature List
40+ - [x] [ Single Select] ( #searchviewdialog )
41+ - [x] [ Multi Select] ( #searchviewdialog )
42+ - [x] [ Filter] ( #searchviewdialog )
6043
61- ``` xml
62- <style name =" AppTheme" parent =" Theme.MaterialComponents.Light.NoActionBar" >
63- <!-- Customize your theme here. -->
64- </style >
65- ```
44+ ## Tech stack and 3rd library
45+ - Material.io ([ docs] ( https://material.io/develop/android/docs/getting-started ) )
46+ - Multi and Single Selection in Recyclerview ([ docs] ( https://medium.com/@maydin/multi-and-single-selection-in-recyclerview-d29587a7dee2 ) ) ([ example] ( https://github.com/gzeinnumer/MultiandSingleSelectioninRecyclerView ) )
47+ - DialogFragment ([ docs] ( https://developer.android.com/reference/android/app/DialogFragment ) )
6648
6749---
6850
@@ -74,25 +56,34 @@ dependencies {
7456
7557---
7658
59+ ** First Step** . Use ` MaterialComponents ` in your style :
60+
61+ ``` xml
62+ <style name =" AppTheme" parent =" Theme.MaterialComponents.Light.NoActionBar" >
63+ <!-- Customize your theme here. -->
64+ </style >
65+ ```
66+
67+ ---
68+ ## USE
69+
7770### SearchViewDialog
7871Dialog 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.
79- - ** Content Item** there is 3 type of is that you can sent to this dialog.
72+ - ** Content Item** there is 3 types data that you can sent to this dialog.
8073
8174** Type 1**
8275``` java
8376String [] arrayString = {" M" , " Fadli" , " Zein" };
8477new SearchViewDialog<String > (getSupportFragmentManager())
8578 .setItems(arrayString);
8679```
87- #
8880** Type 2**
8981``` java
9082ArrayList<String > listString = new ArrayList<> ();
9183listString. add(" Lorem ipsum dolor" );
9284new SearchViewDialog<String > (getSupportFragmentManager())
9385 .setItems(listString);
9486```
95- #
9687** Type 3** for this type you should override function ` toString() ` in your ` model pojo `
9788``` java
9889
@@ -242,7 +233,7 @@ dialog.onCancelPressedCallBack(new SearchViewDialog.OnCancelPressed<String>() {
242233dialog. show();
243234```
244235
245- [ FullCode] ( https://github.com/gzeinnumer/MyLibDialogSearchView/blob/master/app/src/main/java/com/gzeinnumer/mylibsearchviewdialog/MainActivity.java ) ** Preview** :
236+ ** [ FullCode] ( https://github.com/gzeinnumer/MyLibDialogSearchView/blob/master/app/src/main/java/com/gzeinnumer/mylibsearchviewdialog/MainActivity.java ) Preview** :
246237
247238| <img src =" https://github.com/gzeinnumer/MyLibDialogSearchView/blob/master/preview/MyLibDialogSearchView_2.jpg " /> | <img src =" https://github.com/gzeinnumer/MyLibDialogSearchView/blob/master/preview/MyLibDialogSearchView_4.jpg " /> | <img src =" https://github.com/gzeinnumer/MyLibDialogSearchView/blob/master/preview/MyLibDialogSearchView_6.jpg " /> |
248239| :-----------------------------------------------------------------------------------------------------------------| :-----------------------------------------------------------------------------------------------------------------| :-----------------------------------------------------------------------------------------------------------------|
0 commit comments