Skip to content

Commit fe916ef

Browse files
committed
Use list view if popup menu has dividers
1 parent 87c1a6b commit fe916ef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

dynamic-support/src/main/java/com/pranavpandey/android/dynamic/support/popup/DynamicMenuPopup.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,10 @@ public DynamicMenuPopup(@NonNull View anchor, @Nullable int[] iconsRes,
633633

634634
@Override
635635
public @NonNull DynamicPopup build() {
636+
if (getDividers() != null) {
637+
setViewType(Type.LIST);
638+
}
639+
636640
mView = LayoutInflater.from(getAnchor().getContext()).inflate(
637641
mViewType == Type.GRID
638642
? R.layout.ads_preference_spinner_grid

0 commit comments

Comments
 (0)