views-widgets-samples icon indicating copy to clipboard operation
views-widgets-samples copied to clipboard

Multiple samples showing the best practices in views-widgets on Android.

Results 105 views-widgets-samples issues
Sort by recently updated
recently updated
newest added

Fist level,I have 3 fragments with viewPager2, and the second fragment alse have three fragments with viewpager2, I want get the result like this 1 -0,2-1,2-2,2-3,3-0 When i swiped. of...

MotionLayout.TransitionListener is not invoked if swiping fast enough, is this a bug or this is intended to this .

I think the empty file https://github.com/android/views-widgets-samples/blob/main/RecyclerView/build.gradle is causing the whole project to not compile.

When I return the activity containing viewpager2,crash sometimes Device:OPPO R9s Plus Android 6.0.1 Color OS version:V3.0 Log: java.lang.IllegalStateException: Design assumption violated. at androidx.viewpager2.adapter.FragmentStateAdapter.placeFragmentInViewHolder(FragmentStateAdapter.java:287) at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:276) at androidx.viewpager2.adapter.FragmentStateAdapter.onViewAttachedToWindow(FragmentStateAdapter.java:67) at androidx.recyclerview.widget.RecyclerView.dispatchChildAttached(RecyclerView.java:7556) at...

This PR adds two tests. One checks that jsObject is injected and contains postMessage(). The other checks that the drop down menu behaves as expected.

Context: I'm using a modified version of the fragment-transition example, in which we have a `MotionLayout` containing the `TouchFrameLayout`. Inside of it I've replaced the fragments in the example with...

I'm using a tabLayout within a parent fragment to provide 5 child fragments to the user. I'm trying to migrate this from ViewPager to ViewPager2. The issue is that child...

我的ViewPager2中管理着3个Fragment,其中两个Fragment都有RecyclerView,这两个RecyclerView都管理着同样的实时更新的item数据,但是我发现在ViewPager2中当RecyclerView有item数据实时更新出来时所有的item都会闪烁或者发生奇怪的偏移。但是这一系列的现象在ViewPager中都没有出现到,我对这个现象进行了一系列的追溯,有了一点眉目,但不知道该如何解决这个问题,下面展示3种我调试的现象,欢迎大家来参观讨论,我挺期待用上ViewPager2的: #### 现象1(ViewPager2的问题现象): https://user-images.githubusercontent.com/92635075/218529620-d582962a-768d-4222-acd3-6ae7dc38c810.mp4 ```xml ``` ```java viewPager2 = findViewById(R.id.view_pager2); tabLayout = findViewById(R.id.tab_layout); //禁止ViewPager的左右滑动 viewPager2.setUserInputEnabled(false); viewPager2.setOffscreenPageLimit(3); viewPager2.setAdapter(new FragmentStateAdapter(supportFragmentManager, getLifecycle()) { @NonNull @Override public Fragment createFragment(int position) { switch (position){ case...

ViewPager2 is definitely not an improvement over ViewPager from my point of view. Sorry I'm migrating from ViewPager right now and it's terrible. 1. since always the method to add...

The content of each piece of mine is long and short. How can I make viewpager2 fit the height of the subview?