@@ -78,13 +78,11 @@ public class IconDialog extends DialogFragment {
78
78
79
79
@ Retention (RetentionPolicy .SOURCE )
80
80
@ IntDef (value = {VISIBILITY_ALWAYS , VISIBILITY_NEVER , VISIBILITY_IF_LANG_AVAILABLE })
81
- public @interface SearchVisibility {
82
- }
81
+ public @interface SearchVisibility {}
83
82
84
83
@ Retention (RetentionPolicy .SOURCE )
85
84
@ IntDef (value = {VISIBILITY_ALWAYS , VISIBILITY_NEVER , VISIBILITY_IF_NO_SEARCH })
86
- public @interface TitleVisibility {
87
- }
85
+ public @interface TitleVisibility {}
88
86
89
87
public static final int MAX_SELECTION_NONE = -1 ;
90
88
@@ -103,29 +101,29 @@ public class IconDialog extends DialogFragment {
103
101
private int iconSize ;
104
102
private int [] iconColors ;
105
103
106
- private @ SearchVisibility
107
- int searchVisibility ;
108
- private @ Nullable
109
- Locale searchLanguage ;
104
+ @ SearchVisibility
105
+ private int searchVisibility ;
106
+ @ Nullable
107
+ private Locale searchLanguage ;
110
108
private boolean showHeaders ;
111
109
private boolean stickyHeaders ;
112
110
private boolean showSelectBtn ;
113
111
private int maxSelection ;
114
112
private boolean maxSelShowMessage ;
115
- private @ Nullable
116
- String maxSelMessage ;
113
+ @ Nullable
114
+ private String maxSelMessage ;
117
115
private boolean showClearBtn ;
118
- private @ TitleVisibility
119
- int dialogTitleVisibility ;
120
- private @ Nullable
121
- String dialogTitle ;
116
+ @ TitleVisibility
117
+ private int dialogTitleVisibility ;
118
+ @ Nullable
119
+ private String dialogTitle ;
122
120
private BaseIconFilter iconFilter ;
123
121
private boolean loadIconDrawables ;
124
122
125
123
private List <Item > listItems ;
126
124
private List <Item > selectedItems ;
127
- private @ Nullable
128
- int [] selectedIconsId ;
125
+ @ Nullable
126
+ private int [] selectedIconsId ;
129
127
private String searchText ;
130
128
131
129
private boolean searchIgnoreDelay ;
@@ -517,7 +515,6 @@ private Object getCaller() {
517
515
518
516
/**
519
517
* Get the list of icons matching search with category headers
520
- *
521
518
* @param search null to get whole list, or text to search among icon labels to filter icons
522
519
* @return the list of items
523
520
*/
@@ -608,7 +605,6 @@ public int compare(Item i1, Item i2) {
608
605
609
606
/**
610
607
* Get the position of items in the adapter
611
- *
612
608
* @param items array of icon items (varargs)
613
609
* @return the array of positions
614
610
*/
@@ -634,7 +630,6 @@ private int[] getItemsPosition(Item... items) {
634
630
/**
635
631
* Depending on the setting set at {@link #setSearchEnabled(int, Locale)}, checks
636
632
* whether search will be enabled or not
637
- *
638
633
* @return true if search is enabled
639
634
*/
640
635
public boolean isSearchAvailable () {
@@ -671,7 +666,6 @@ public boolean isSearchAvailable() {
671
666
* Set whether search is enabled or not
672
667
* By default, search is only enabled if device's language is available
673
668
* When search is not enabled, a title will be shown on the dialog instead of the search bar
674
- *
675
669
* @param visibility {@link #VISIBILITY_ALWAYS} to always enable search.
676
670
* {@link #VISIBILITY_NEVER} to always disable search.
677
671
* {@link #VISIBILITY_IF_LANG_AVAILABLE} to enable search only if the language is available
@@ -690,7 +684,6 @@ public IconDialog setSearchEnabled(@SearchVisibility int visibility, @Nullable L
690
684
691
685
/**
692
686
* Set the title of the dialog and when it is shown
693
- *
694
687
* @param visibility {@link #VISIBILITY_ALWAYS} to always show the title
695
688
* {@link #VISIBILITY_NEVER} to never show the title
696
689
* {@link #VISIBILITY_IF_NO_SEARCH} to only show the title if search is not available
@@ -706,7 +699,6 @@ public IconDialog setTitle(@TitleVisibility int visibility, @Nullable String tit
706
699
/**
707
700
* Set list header options
708
701
* By default, headers are shown and are sticky
709
- *
710
702
* @param show whether to show the headers or not
711
703
* @param sticky if headers are shown, whether they appear on top of the list when scrolling down
712
704
* @return the dialog
@@ -721,7 +713,6 @@ public IconDialog setShowHeaders(boolean show, boolean sticky) {
721
713
* Set whether the select button and the other dialog dialog buttons are shown
722
714
* If not, dialog will be dismissed immediately after an icon is clicked.
723
715
* By default, selection is shown. It is always shown if multiple selection is allowed
724
- *
725
716
* @param show whether select button is shown or not
726
717
* @return the dialog
727
718
*/
@@ -732,7 +723,6 @@ public IconDialog setShowSelectButton(boolean show) {
732
723
733
724
/**
734
725
* Set initial selected icons
735
- *
736
726
* @param iconIds varargs of icons id, null or empty array for no initial selection
737
727
* @return the dialog
738
728
*/
@@ -747,7 +737,6 @@ public IconDialog setSelectedIcons(@Nullable int... iconIds) {
747
737
748
738
/**
749
739
* Set initial selected icons
750
- *
751
740
* @param icons varargs of icons, null or empty array for no initial selection
752
741
* @return the dialog
753
742
*/
@@ -769,7 +758,6 @@ public IconDialog setSelectedIcons(@Nullable Icon... icons) {
769
758
770
759
/**
771
760
* Set maximum number of icons that can be selected
772
- *
773
761
* @param max maximum number
774
762
* @param showMessage If true, a message will be shown when maximum selection is reached
775
763
* User will need to deselect icons to select others
@@ -794,7 +782,6 @@ public IconDialog setMaxSelection(int max, boolean showMessage) {
794
782
/**
795
783
* Set whether to show the neutral clear button to unselect all icons
796
784
* By default, this button is not shown.
797
- *
798
785
* @param show whether to show it or not
799
786
* @return the dialog
800
787
*/
@@ -809,7 +796,6 @@ public IconDialog setShowClearButton(boolean show) {
809
796
* and will be sorted by category, then by labels and then by ID
810
797
* in its value. Multiple search terms can be separated with either " ", "," or ";"
811
798
* A custom icon searcher can be set by subclassing {@link IconFilter}
812
- *
813
799
* @param filter icon filter
814
800
* @return the dialog
815
801
*/
@@ -824,7 +810,6 @@ public IconDialog setIconFilter(BaseIconFilter filter) {
824
810
/**
825
811
* Get the IconFilter used to search and sort icons.
826
812
* You can set additionnal settings with it
827
- *
828
813
* @return the icon searcher
829
814
* @see IconFilter#setDisabledCategories(int...)
830
815
* @see IconFilter#setDisabledIcons(int...)
@@ -837,7 +822,6 @@ public BaseIconFilter getIconFilter() {
837
822
/**
838
823
* Set whether all icon drawables will be preloaded when dialog is shown to allow a smoother
839
824
* scrolling in the icon list. By default, drawables are preloaded.
840
- *
841
825
* @param load whether to load them or not
842
826
* @return the dialog
843
827
* @see IconHelper#loadIconDrawables()
@@ -1077,7 +1061,6 @@ public interface Callback {
1077
1061
/**
1078
1062
* Called on the target fragment, parent fragment or parent activity when
1079
1063
* icons are selected and user confirms the selection.
1080
- *
1081
1064
* @param icons selected icons, never null.
1082
1065
*/
1083
1066
void onIconDialogIconsSelected (@ NonNull Icon [] icons );
0 commit comments