Remove remained references of ViewPager
This commit is contained in:
parent
79e85363fb
commit
3a11f2842b
|
@ -4,8 +4,9 @@ import android.content.Context;
|
|||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
|
||||
|
@ -31,8 +32,8 @@ public class ViewPagerBottomSheetBehavior<V extends View> extends BottomSheetBeh
|
|||
return view;
|
||||
}
|
||||
|
||||
if (view instanceof ViewPager) {
|
||||
ViewPager viewPager = (ViewPager) view;
|
||||
if (view instanceof ViewPager2) {
|
||||
ViewPager2 viewPager = (ViewPager2) view;
|
||||
View currentViewPagerChild = viewPager.getChildAt(viewPager.getCurrentItem());
|
||||
if (currentViewPagerChild != null) {
|
||||
return findScrollingChild(currentViewPagerChild);
|
||||
|
|
|
@ -9,9 +9,6 @@ import androidx.annotation.NonNull;
|
|||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.appcompat.widget.Toolbar;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentPagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.viewpager2.adapter.FragmentStateAdapter;
|
||||
import androidx.viewpager2.widget.ViewPager2;
|
||||
|
||||
|
|
Loading…
Reference in New Issue