Small improvement

This commit is contained in:
M66B 2023-10-16 09:51:43 +02:00
parent ecb79bbcd1
commit 4120631838
1 changed files with 10 additions and 1 deletions

View File

@ -68,6 +68,8 @@ public class FragmentOptions extends FragmentBase {
private String searching = null;
private SuggestData data = null;
private int dp24;
static final long DELAY_SETOPTIONS = 20; // ms
private static final int[] TAB_PAGES = {
@ -174,6 +176,13 @@ public class FragmentOptions extends FragmentBase {
super.onSaveInstanceState(outState);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Context context = getContext();
this.dp24 = (context == null ? -48 : Helper.dp2pixels(context, 24));
}
@Override
@Nullable
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@ -296,7 +305,7 @@ public class FragmentOptions extends FragmentBase {
FragmentBase fragment = (FragmentBase) adapter.instantiateItem(pager, tab);
if (fragment instanceof FragmentSetup)
((FragmentSetup) fragment).prepareSearch();
fragment.scrollTo(resid, -48);
fragment.scrollTo(resid, -dp24);
menuSearch.collapseActionView();
// Blink found text