|
|
@@ -66,13 +66,21 @@ public class FilterDialog extends DialogBase<IFilterListener<FilterDialog>> impl
|
|
|
}
|
|
|
|
|
|
public void setFilterDetail(FilterBean filterBean) {
|
|
|
+ setEnabled(false);
|
|
|
showDialogDetail(currentDetailSection, filterBean);
|
|
|
}
|
|
|
|
|
|
public void failFilterDetail(FilterBean filterBean) {
|
|
|
+ setEnabled(true);
|
|
|
currentDetailSection.onDetailFailure(filterBean);
|
|
|
}
|
|
|
|
|
|
+ public void setEnabled(boolean enabled) {
|
|
|
+ for (FilterSection filterSection : sectionList) {
|
|
|
+ filterSection.setEnabled(enabled);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Nullable
|
|
|
@Override
|
|
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
|
|
@@ -150,11 +158,13 @@ public class FilterDialog extends DialogBase<IFilterListener<FilterDialog>> impl
|
|
|
@Override
|
|
|
public void onRequestDetail(FilterSection section, FilterBean filterBean) {
|
|
|
currentDetailSection = section;
|
|
|
+ setEnabled(false);
|
|
|
getCustomListener().onFilterDetail(FilterDialog.this, filterBean);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public void onRequestContentsCount(FilterSection section, FilterBean filterBean) {
|
|
|
+ closeDetail();
|
|
|
applyContentsNumber(filterBean);
|
|
|
}
|
|
|
|
|
|
@@ -165,6 +175,13 @@ public class FilterDialog extends DialogBase<IFilterListener<FilterDialog>> impl
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void closeDetail() {
|
|
|
+ if (null != detailDialog) {
|
|
|
+ detailDialog.dispose();
|
|
|
+ detailDialog = null;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
FilterDetailDialog detailDialog;
|
|
|
|
|
|
private void showDialogDetail(FilterSection section, FilterBean filterBean) {
|
|
|
@@ -176,12 +193,6 @@ public class FilterDialog extends DialogBase<IFilterListener<FilterDialog>> impl
|
|
|
// nothing
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public void onDialogCanceled(FilterDetailDialog dialog) {
|
|
|
- dialog.dispose();
|
|
|
- detailDialog = null;
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
public void onFilterReset(FilterDetailDialog dialog) {
|
|
|
// nothing
|
|
|
@@ -202,9 +213,17 @@ public class FilterDialog extends DialogBase<IFilterListener<FilterDialog>> impl
|
|
|
// nothing
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public void onDialogCanceled(FilterDetailDialog dialog) {
|
|
|
+ dialog.dispose();
|
|
|
+ setEnabled(true);
|
|
|
+ detailDialog = null;
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void onFilterResult(FilterDetailDialog dialog) {
|
|
|
dialog.dispose();
|
|
|
+ setEnabled(true);
|
|
|
detailDialog = null;
|
|
|
|
|
|
section.onDetailResult(filterBean);
|