[app] Fix crash when rotating screen (#743)
This commit is contained in:
parent
ccafa7d29a
commit
32329ac7d3
|
|
@ -368,7 +368,9 @@ public class ModulesFragment extends BaseFragment implements ModuleUtil.ModuleLi
|
|||
}
|
||||
}
|
||||
});
|
||||
binding.recyclerView.onApplyWindowInsets(requireActivity().getWindow().getDecorView().getRootWindowInsets());
|
||||
var insets = requireActivity().getWindow().getDecorView().getRootWindowInsets();
|
||||
if (insets != null)
|
||||
binding.recyclerView.onApplyWindowInsets(insets);
|
||||
RecyclerViewKt.fixEdgeEffect(binding.recyclerView, false, true);
|
||||
RecyclerViewKt.addFastScroller(binding.recyclerView, binding.recyclerView);
|
||||
return binding.getRoot();
|
||||
|
|
|
|||
|
|
@ -406,7 +406,9 @@ public class RepoItemFragment extends BaseFragment implements RepoLoader.Listene
|
|||
holder.recyclerView.setTag(position);
|
||||
holder.recyclerView.setLayoutManager(new LinearLayoutManagerFix(requireActivity()));
|
||||
holder.recyclerView.getBorderViewDelegate().setBorderVisibilityChangedListener((top, oldTop, bottom, oldBottom) -> binding.appBar.setRaised(!top));
|
||||
holder.recyclerView.onApplyWindowInsets(requireActivity().getWindow().getDecorView().getRootWindowInsets());
|
||||
var insets = requireActivity().getWindow().getDecorView().getRootWindowInsets();
|
||||
if (insets != null)
|
||||
holder.recyclerView.onApplyWindowInsets(insets);
|
||||
RecyclerViewKt.fixEdgeEffect(holder.recyclerView, false, true);
|
||||
RecyclerViewKt.addFastScroller(holder.recyclerView, holder.itemView);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue