Skip to content
This repository was archived by the owner on Jul 23, 2022. It is now read-only.

Commit c8b8ae6

Browse files
committed
.
1 parent 15afcdc commit c8b8ae6

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

library/src/main/java/com/obsez/android/lib/filechooser/ChooserDialog.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -714,12 +714,11 @@ public boolean onPreDraw() {
714714
if (_pathView.getHeight() <= 0) {
715715
return false;
716716
}
717-
_pathView.getViewTreeObserver().removeOnPreDrawListener(this);
717+
viewTreeObserver.removeOnPreDrawListener(this);
718718
if (_pathView.getParent() instanceof FrameLayout) {
719719
param.topMargin = _pathView.getHeight();
720720
}
721721
_list.setLayoutParams(param);
722-
viewTreeObserver.removeOnPreDrawListener(this);
723722
return true;
724723
}
725724
});

library/src/main/java/com/obsez/android/lib/filechooser/onShowListener.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public boolean onPreDraw() {
143143
if (_c.get()._options.getHeight() <= 0) {
144144
return false;
145145
}
146-
_c.get()._options.getViewTreeObserver().removeOnPreDrawListener(this);
146+
viewTreeObserver.removeOnPreDrawListener(this);
147147
scroll.Int = getListYScroll(_c.get()._list);
148148
if (_c.get()._options.getParent() instanceof FrameLayout) {
149149
final ViewGroup.MarginLayoutParams params =
@@ -153,7 +153,6 @@ public boolean onPreDraw() {
153153
}
154154
_c.get()._options.setVisibility(View.VISIBLE);
155155
_c.get()._options.requestFocus();
156-
viewTreeObserver.removeOnPreDrawListener(this);
157156
return true;
158157
}
159158
});

0 commit comments

Comments
 (0)