Skip to content

Commit 7dda6e1

Browse files
committedMar 9, 2025
feat: disable repository module tab transition
1 parent 61ecaec commit 7dda6e1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed
 

‎app/src/main/java/org/lsposed/manager/ui/fragment/RepoItemFragment.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
import org.lsposed.manager.ui.dialog.BlurBehindDialogBuilder;
8080
import org.lsposed.manager.ui.widget.EmptyStateRecyclerView;
8181
import org.lsposed.manager.ui.widget.LinkifyTextView;
82+
import org.lsposed.manager.util.AccessibilityUtils;
8283
import org.lsposed.manager.util.NavUtil;
8384
import org.lsposed.manager.util.SimpleStatefulAdaptor;
8485
import org.lsposed.manager.util.chrome.CustomTabsURLSpan;
@@ -122,7 +123,15 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
122123
binding.toolbar.setSubtitle(modulePackageName);
123124
binding.viewPager.setAdapter(new PagerAdapter(this));
124125
int[] titles = new int[]{R.string.module_readme, R.string.module_releases, R.string.module_information};
125-
new TabLayoutMediator(binding.tabLayout, binding.viewPager, (tab, position) -> tab.setText(titles[position])).attach();
126+
127+
var isAnimationEnabled = AccessibilityUtils.isAnimationEnabled(requireContext().getContentResolver());
128+
new TabLayoutMediator(
129+
binding.tabLayout,
130+
binding.viewPager,
131+
isAnimationEnabled,
132+
isAnimationEnabled,
133+
(tab, position) -> tab.setText(titles[position])
134+
).attach();
126135

127136
binding.tabLayout.addOnLayoutChangeListener((view, left, top, right, bottom, oldLeft, oldTop, oldRight, oldBottom) -> {
128137
ViewGroup vg = (ViewGroup) binding.tabLayout.getChildAt(0);

0 commit comments

Comments
 (0)