ViewPager is Too Slow While is Swiping











up vote
0
down vote

favorite












I am trying to do my own slider on Android with Java.
Before the asking this question, I made research so much but I could not find any solution.



My ViewPager is too slow when it's swiping on API 21, but it's great on API 23 or above.



these but I could not succeeded:




  1. I have tried the viewPager.setOffscreenPageLimit(0);

  2. I have tried to resize images.

  3. I have tried to use Glide but later turned back to setImageResource.


    • 3.1 I have tried DiskCacheStrategy.ALL



  4. I have tried to use RecyclerView instead of ViewPager but the same scrolling stuck.


    • 4.1 I have tried recyclerView.setHasFixedFixedSize(true);

    • 4.2 I did not do any process in onBindViewHolder



  5. Even I did not put any image to ImageView still kept going.
    You can see my code below.


Activity:



    @Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_timeline);

//Slider Process
ViewPager slider = findViewById(R.id.vpSlider);
ViewPagerIndicator pagerIndicator = findViewById(R.id.vpiTimeline);
SliderAdapter sliderAdapter = new SliderAdapter(slider.getContext(),listSliderUrl());
slider.setAdapter(sliderAdapter);
slider.setOffscreenPageLimit(10);
pagerIndicator.setupWithViewPager(slider);


ViewPager Adapter:



public class SliderAdapter extends PagerAdapter {

private Context context;
private List<Integer> urls;
private LayoutInflater inflater;

public SliderAdapter(Context context, List<Integer> urls) {
this.context = context;
this.urls = urls;
}

@Override
public int getCount() {
return urls.size();
}

@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
return (View)object == view;
}

@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
container.removeView((View) object);
}

@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
inflater =

(LayoutInflater)context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
// View view = LayoutInflater.from(context).inflate(R.layout.item_slider,container,false);
View view = inflater.inflate(R.layout.item_slider,container,false);
ImageView iv = view.findViewById(R.id.ivSlider);
// GlideApp.with(context).load(urls.get(position)).diskCacheStrategy(DiskCacheStrategy.ALL).into(iv);
iv.setImageResource(urls.get(position));
container.addView(view);
return view;
}
}


Recycler View Adapter:




public class RecyclerViewSliderAdapter extends RecyclerView.Adapter {

Context context;
List<Integer> urls;

public RecyclerViewSliderAdapter(Context context, List<Integer> urls) {
this.context = context;
this.urls = urls;
}

@NonNull
@Override
public ViewHolderSlider onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View layoutView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_slider,parent,false);
ViewHolderSlider viewHolderSlider = new ViewHolderSlider(layoutView);
return viewHolderSlider;
}

@Override
public void onBindViewHolder(@NonNull ViewHolderSlider holder, int position) {
holder.bindData(urls.get(position));
}

@Override
public int getItemCount() {
return urls.size();
}


}

class ViewHolderSlider extends RecyclerView.ViewHolder{

ImageView ivSlider;
public ViewHolderSlider(View itemView) {
super(itemView);
ivSlider = (ImageView)itemView.findViewById(R.id.ivSlider);
}
public void bindData(final Integer url){
ivSlider.setImageResource(url);
}}


//Here is my item_slider.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/ivSlider"
android:layout_width="match_parent" android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent" android:layout_margin="0dp"/>
<ImageView
android:id="@+id/ivGradient"
android:layout_width="match_parent"
android:layout_height="111dp"
android:layout_margin="0dp"
android:src="@mipmap/gradient"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="@id/ivSlider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tvSliderHeader"
android:layout_width="match_parent"
android:fontFamily="@font/opensans_light"
android:textSize="11sp"
android:textColor="@color/yellow"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvSliderTitle"
android:layout_marginBottom="7dp"
android:layout_marginStart="32dp"
android:text="@string/dunya" />
<TextView
android:id="@+id/tvSliderTitle"
android:textSize="24sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/ivSlider"
android:layout_marginBottom="26dp"
android:layout_marginStart="31dp"
android:textColor="@color/white"
android:textStyle="bold"
android:text="TÜRKİYE'YE KARŞInHİSLERİM DEĞİŞTİ" />
</android.support.constraint.ConstraintLayout>









share|improve this question
























  • Is ViewHolderSlider in a separate class file? And what was the problem with Glide? May also help to see the layout file for item_slider
    – PPartisan
    yesterday












  • @Murat Sahin, may be it will help you : try to change number of pages that are off screen, i.e. total number of pages minus 1
    – Rishav Singla
    yesterday










  • @PPartisan I used both, for now it's in the same file different classes. Glide also slow, it did not work for making faster to load.
    – Murat Sahin
    yesterday










  • @RishavSingla Unfortunately dude, did not work.
    – Murat Sahin
    yesterday















up vote
0
down vote

favorite












I am trying to do my own slider on Android with Java.
Before the asking this question, I made research so much but I could not find any solution.



My ViewPager is too slow when it's swiping on API 21, but it's great on API 23 or above.



these but I could not succeeded:




  1. I have tried the viewPager.setOffscreenPageLimit(0);

  2. I have tried to resize images.

  3. I have tried to use Glide but later turned back to setImageResource.


    • 3.1 I have tried DiskCacheStrategy.ALL



  4. I have tried to use RecyclerView instead of ViewPager but the same scrolling stuck.


    • 4.1 I have tried recyclerView.setHasFixedFixedSize(true);

    • 4.2 I did not do any process in onBindViewHolder



  5. Even I did not put any image to ImageView still kept going.
    You can see my code below.


Activity:



    @Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_timeline);

//Slider Process
ViewPager slider = findViewById(R.id.vpSlider);
ViewPagerIndicator pagerIndicator = findViewById(R.id.vpiTimeline);
SliderAdapter sliderAdapter = new SliderAdapter(slider.getContext(),listSliderUrl());
slider.setAdapter(sliderAdapter);
slider.setOffscreenPageLimit(10);
pagerIndicator.setupWithViewPager(slider);


ViewPager Adapter:



public class SliderAdapter extends PagerAdapter {

private Context context;
private List<Integer> urls;
private LayoutInflater inflater;

public SliderAdapter(Context context, List<Integer> urls) {
this.context = context;
this.urls = urls;
}

@Override
public int getCount() {
return urls.size();
}

@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
return (View)object == view;
}

@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
container.removeView((View) object);
}

@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
inflater =

(LayoutInflater)context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
// View view = LayoutInflater.from(context).inflate(R.layout.item_slider,container,false);
View view = inflater.inflate(R.layout.item_slider,container,false);
ImageView iv = view.findViewById(R.id.ivSlider);
// GlideApp.with(context).load(urls.get(position)).diskCacheStrategy(DiskCacheStrategy.ALL).into(iv);
iv.setImageResource(urls.get(position));
container.addView(view);
return view;
}
}


Recycler View Adapter:




public class RecyclerViewSliderAdapter extends RecyclerView.Adapter {

Context context;
List<Integer> urls;

public RecyclerViewSliderAdapter(Context context, List<Integer> urls) {
this.context = context;
this.urls = urls;
}

@NonNull
@Override
public ViewHolderSlider onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View layoutView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_slider,parent,false);
ViewHolderSlider viewHolderSlider = new ViewHolderSlider(layoutView);
return viewHolderSlider;
}

@Override
public void onBindViewHolder(@NonNull ViewHolderSlider holder, int position) {
holder.bindData(urls.get(position));
}

@Override
public int getItemCount() {
return urls.size();
}


}

class ViewHolderSlider extends RecyclerView.ViewHolder{

ImageView ivSlider;
public ViewHolderSlider(View itemView) {
super(itemView);
ivSlider = (ImageView)itemView.findViewById(R.id.ivSlider);
}
public void bindData(final Integer url){
ivSlider.setImageResource(url);
}}


//Here is my item_slider.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/ivSlider"
android:layout_width="match_parent" android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent" android:layout_margin="0dp"/>
<ImageView
android:id="@+id/ivGradient"
android:layout_width="match_parent"
android:layout_height="111dp"
android:layout_margin="0dp"
android:src="@mipmap/gradient"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="@id/ivSlider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tvSliderHeader"
android:layout_width="match_parent"
android:fontFamily="@font/opensans_light"
android:textSize="11sp"
android:textColor="@color/yellow"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvSliderTitle"
android:layout_marginBottom="7dp"
android:layout_marginStart="32dp"
android:text="@string/dunya" />
<TextView
android:id="@+id/tvSliderTitle"
android:textSize="24sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/ivSlider"
android:layout_marginBottom="26dp"
android:layout_marginStart="31dp"
android:textColor="@color/white"
android:textStyle="bold"
android:text="TÜRKİYE'YE KARŞInHİSLERİM DEĞİŞTİ" />
</android.support.constraint.ConstraintLayout>









share|improve this question
























  • Is ViewHolderSlider in a separate class file? And what was the problem with Glide? May also help to see the layout file for item_slider
    – PPartisan
    yesterday












  • @Murat Sahin, may be it will help you : try to change number of pages that are off screen, i.e. total number of pages minus 1
    – Rishav Singla
    yesterday










  • @PPartisan I used both, for now it's in the same file different classes. Glide also slow, it did not work for making faster to load.
    – Murat Sahin
    yesterday










  • @RishavSingla Unfortunately dude, did not work.
    – Murat Sahin
    yesterday













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am trying to do my own slider on Android with Java.
Before the asking this question, I made research so much but I could not find any solution.



My ViewPager is too slow when it's swiping on API 21, but it's great on API 23 or above.



these but I could not succeeded:




  1. I have tried the viewPager.setOffscreenPageLimit(0);

  2. I have tried to resize images.

  3. I have tried to use Glide but later turned back to setImageResource.


    • 3.1 I have tried DiskCacheStrategy.ALL



  4. I have tried to use RecyclerView instead of ViewPager but the same scrolling stuck.


    • 4.1 I have tried recyclerView.setHasFixedFixedSize(true);

    • 4.2 I did not do any process in onBindViewHolder



  5. Even I did not put any image to ImageView still kept going.
    You can see my code below.


Activity:



    @Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_timeline);

//Slider Process
ViewPager slider = findViewById(R.id.vpSlider);
ViewPagerIndicator pagerIndicator = findViewById(R.id.vpiTimeline);
SliderAdapter sliderAdapter = new SliderAdapter(slider.getContext(),listSliderUrl());
slider.setAdapter(sliderAdapter);
slider.setOffscreenPageLimit(10);
pagerIndicator.setupWithViewPager(slider);


ViewPager Adapter:



public class SliderAdapter extends PagerAdapter {

private Context context;
private List<Integer> urls;
private LayoutInflater inflater;

public SliderAdapter(Context context, List<Integer> urls) {
this.context = context;
this.urls = urls;
}

@Override
public int getCount() {
return urls.size();
}

@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
return (View)object == view;
}

@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
container.removeView((View) object);
}

@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
inflater =

(LayoutInflater)context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
// View view = LayoutInflater.from(context).inflate(R.layout.item_slider,container,false);
View view = inflater.inflate(R.layout.item_slider,container,false);
ImageView iv = view.findViewById(R.id.ivSlider);
// GlideApp.with(context).load(urls.get(position)).diskCacheStrategy(DiskCacheStrategy.ALL).into(iv);
iv.setImageResource(urls.get(position));
container.addView(view);
return view;
}
}


Recycler View Adapter:




public class RecyclerViewSliderAdapter extends RecyclerView.Adapter {

Context context;
List<Integer> urls;

public RecyclerViewSliderAdapter(Context context, List<Integer> urls) {
this.context = context;
this.urls = urls;
}

@NonNull
@Override
public ViewHolderSlider onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View layoutView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_slider,parent,false);
ViewHolderSlider viewHolderSlider = new ViewHolderSlider(layoutView);
return viewHolderSlider;
}

@Override
public void onBindViewHolder(@NonNull ViewHolderSlider holder, int position) {
holder.bindData(urls.get(position));
}

@Override
public int getItemCount() {
return urls.size();
}


}

class ViewHolderSlider extends RecyclerView.ViewHolder{

ImageView ivSlider;
public ViewHolderSlider(View itemView) {
super(itemView);
ivSlider = (ImageView)itemView.findViewById(R.id.ivSlider);
}
public void bindData(final Integer url){
ivSlider.setImageResource(url);
}}


//Here is my item_slider.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/ivSlider"
android:layout_width="match_parent" android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent" android:layout_margin="0dp"/>
<ImageView
android:id="@+id/ivGradient"
android:layout_width="match_parent"
android:layout_height="111dp"
android:layout_margin="0dp"
android:src="@mipmap/gradient"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="@id/ivSlider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tvSliderHeader"
android:layout_width="match_parent"
android:fontFamily="@font/opensans_light"
android:textSize="11sp"
android:textColor="@color/yellow"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvSliderTitle"
android:layout_marginBottom="7dp"
android:layout_marginStart="32dp"
android:text="@string/dunya" />
<TextView
android:id="@+id/tvSliderTitle"
android:textSize="24sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/ivSlider"
android:layout_marginBottom="26dp"
android:layout_marginStart="31dp"
android:textColor="@color/white"
android:textStyle="bold"
android:text="TÜRKİYE'YE KARŞInHİSLERİM DEĞİŞTİ" />
</android.support.constraint.ConstraintLayout>









share|improve this question















I am trying to do my own slider on Android with Java.
Before the asking this question, I made research so much but I could not find any solution.



My ViewPager is too slow when it's swiping on API 21, but it's great on API 23 or above.



these but I could not succeeded:




  1. I have tried the viewPager.setOffscreenPageLimit(0);

  2. I have tried to resize images.

  3. I have tried to use Glide but later turned back to setImageResource.


    • 3.1 I have tried DiskCacheStrategy.ALL



  4. I have tried to use RecyclerView instead of ViewPager but the same scrolling stuck.


    • 4.1 I have tried recyclerView.setHasFixedFixedSize(true);

    • 4.2 I did not do any process in onBindViewHolder



  5. Even I did not put any image to ImageView still kept going.
    You can see my code below.


Activity:



    @Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_timeline);

//Slider Process
ViewPager slider = findViewById(R.id.vpSlider);
ViewPagerIndicator pagerIndicator = findViewById(R.id.vpiTimeline);
SliderAdapter sliderAdapter = new SliderAdapter(slider.getContext(),listSliderUrl());
slider.setAdapter(sliderAdapter);
slider.setOffscreenPageLimit(10);
pagerIndicator.setupWithViewPager(slider);


ViewPager Adapter:



public class SliderAdapter extends PagerAdapter {

private Context context;
private List<Integer> urls;
private LayoutInflater inflater;

public SliderAdapter(Context context, List<Integer> urls) {
this.context = context;
this.urls = urls;
}

@Override
public int getCount() {
return urls.size();
}

@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object object) {
return (View)object == view;
}

@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
container.removeView((View) object);
}

@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
inflater =

(LayoutInflater)context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
// View view = LayoutInflater.from(context).inflate(R.layout.item_slider,container,false);
View view = inflater.inflate(R.layout.item_slider,container,false);
ImageView iv = view.findViewById(R.id.ivSlider);
// GlideApp.with(context).load(urls.get(position)).diskCacheStrategy(DiskCacheStrategy.ALL).into(iv);
iv.setImageResource(urls.get(position));
container.addView(view);
return view;
}
}


Recycler View Adapter:




public class RecyclerViewSliderAdapter extends RecyclerView.Adapter {

Context context;
List<Integer> urls;

public RecyclerViewSliderAdapter(Context context, List<Integer> urls) {
this.context = context;
this.urls = urls;
}

@NonNull
@Override
public ViewHolderSlider onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View layoutView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_slider,parent,false);
ViewHolderSlider viewHolderSlider = new ViewHolderSlider(layoutView);
return viewHolderSlider;
}

@Override
public void onBindViewHolder(@NonNull ViewHolderSlider holder, int position) {
holder.bindData(urls.get(position));
}

@Override
public int getItemCount() {
return urls.size();
}


}

class ViewHolderSlider extends RecyclerView.ViewHolder{

ImageView ivSlider;
public ViewHolderSlider(View itemView) {
super(itemView);
ivSlider = (ImageView)itemView.findViewById(R.id.ivSlider);
}
public void bindData(final Integer url){
ivSlider.setImageResource(url);
}}


//Here is my item_slider.xml



<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView
android:id="@+id/ivSlider"
android:layout_width="match_parent" android:layout_height="match_parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent" android:layout_margin="0dp"/>
<ImageView
android:id="@+id/ivGradient"
android:layout_width="match_parent"
android:layout_height="111dp"
android:layout_margin="0dp"
android:src="@mipmap/gradient"
android:scaleType="fitXY"
app:layout_constraintBottom_toBottomOf="@id/ivSlider"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<TextView
android:id="@+id/tvSliderHeader"
android:layout_width="match_parent"
android:fontFamily="@font/opensans_light"
android:textSize="11sp"
android:textColor="@color/yellow"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toTopOf="@id/tvSliderTitle"
android:layout_marginBottom="7dp"
android:layout_marginStart="32dp"
android:text="@string/dunya" />
<TextView
android:id="@+id/tvSliderTitle"
android:textSize="24sp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintBottom_toBottomOf="@id/ivSlider"
android:layout_marginBottom="26dp"
android:layout_marginStart="31dp"
android:textColor="@color/white"
android:textStyle="bold"
android:text="TÜRKİYE'YE KARŞInHİSLERİM DEĞİŞTİ" />
</android.support.constraint.ConstraintLayout>






android android-recyclerview android-viewpager






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 20 hours ago

























asked yesterday









Murat Sahin

1715




1715












  • Is ViewHolderSlider in a separate class file? And what was the problem with Glide? May also help to see the layout file for item_slider
    – PPartisan
    yesterday












  • @Murat Sahin, may be it will help you : try to change number of pages that are off screen, i.e. total number of pages minus 1
    – Rishav Singla
    yesterday










  • @PPartisan I used both, for now it's in the same file different classes. Glide also slow, it did not work for making faster to load.
    – Murat Sahin
    yesterday










  • @RishavSingla Unfortunately dude, did not work.
    – Murat Sahin
    yesterday


















  • Is ViewHolderSlider in a separate class file? And what was the problem with Glide? May also help to see the layout file for item_slider
    – PPartisan
    yesterday












  • @Murat Sahin, may be it will help you : try to change number of pages that are off screen, i.e. total number of pages minus 1
    – Rishav Singla
    yesterday










  • @PPartisan I used both, for now it's in the same file different classes. Glide also slow, it did not work for making faster to load.
    – Murat Sahin
    yesterday










  • @RishavSingla Unfortunately dude, did not work.
    – Murat Sahin
    yesterday
















Is ViewHolderSlider in a separate class file? And what was the problem with Glide? May also help to see the layout file for item_slider
– PPartisan
yesterday






Is ViewHolderSlider in a separate class file? And what was the problem with Glide? May also help to see the layout file for item_slider
– PPartisan
yesterday














@Murat Sahin, may be it will help you : try to change number of pages that are off screen, i.e. total number of pages minus 1
– Rishav Singla
yesterday




@Murat Sahin, may be it will help you : try to change number of pages that are off screen, i.e. total number of pages minus 1
– Rishav Singla
yesterday












@PPartisan I used both, for now it's in the same file different classes. Glide also slow, it did not work for making faster to load.
– Murat Sahin
yesterday




@PPartisan I used both, for now it's in the same file different classes. Glide also slow, it did not work for making faster to load.
– Murat Sahin
yesterday












@RishavSingla Unfortunately dude, did not work.
– Murat Sahin
yesterday




@RishavSingla Unfortunately dude, did not work.
– Murat Sahin
yesterday

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371937%2fviewpager-is-too-slow-while-is-swiping%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53371937%2fviewpager-is-too-slow-while-is-swiping%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

'app-layout' is not a known element: how to share Component with different Modules