Add classic configuration to wizard button

This commit is contained in:
M66B
2021-08-03 22:25:19 +02:00
parent 0958c9f349
commit 65b63104fd
2 changed files with 31 additions and 7 deletions

View File

@@ -133,13 +133,17 @@ public class FragmentBase extends Fragment {
scroll.post(new Runnable() {
@Override
public void run() {
Rect rect = new Rect();
child.getDrawingRect(rect);
scroll.offsetDescendantRectToMyCoords(child, rect);
int y = rect.top - scroll.getPaddingTop() + dy;
if (y < 0)
y = 0;
scroll.scrollTo(0, y);
try {
Rect rect = new Rect();
child.getDrawingRect(rect);
scroll.offsetDescendantRectToMyCoords(child, rect);
int y = rect.top - scroll.getPaddingTop() + dy;
if (y < 0)
y = 0;
scroll.scrollTo(0, y);
} catch (Throwable ex) {
Log.e(ex);
}
}
});
}