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:
- I have tried the viewPager.setOffscreenPageLimit(0);
- I have tried to resize images.
- I have tried to use Glide but later turned back to setImageResource.
- 3.1 I have tried DiskCacheStrategy.ALL
- 3.1 I have tried DiskCacheStrategy.ALL
- 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
- 4.1 I have tried recyclerView.setHasFixedFixedSize(true);
- 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
add a comment |
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:
- I have tried the viewPager.setOffscreenPageLimit(0);
- I have tried to resize images.
- I have tried to use Glide but later turned back to setImageResource.
- 3.1 I have tried DiskCacheStrategy.ALL
- 3.1 I have tried DiskCacheStrategy.ALL
- 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
- 4.1 I have tried recyclerView.setHasFixedFixedSize(true);
- 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
IsViewHolderSlider
in a separate class file? And what was the problem with Glide? May also help to see the layout file foritem_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
add a comment |
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:
- I have tried the viewPager.setOffscreenPageLimit(0);
- I have tried to resize images.
- I have tried to use Glide but later turned back to setImageResource.
- 3.1 I have tried DiskCacheStrategy.ALL
- 3.1 I have tried DiskCacheStrategy.ALL
- 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
- 4.1 I have tried recyclerView.setHasFixedFixedSize(true);
- 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
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:
- I have tried the viewPager.setOffscreenPageLimit(0);
- I have tried to resize images.
- I have tried to use Glide but later turned back to setImageResource.
- 3.1 I have tried DiskCacheStrategy.ALL
- 3.1 I have tried DiskCacheStrategy.ALL
- 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
- 4.1 I have tried recyclerView.setHasFixedFixedSize(true);
- 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
android android-recyclerview android-viewpager
edited 20 hours ago
asked yesterday
Murat Sahin
1715
1715
IsViewHolderSlider
in a separate class file? And what was the problem with Glide? May also help to see the layout file foritem_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
add a comment |
IsViewHolderSlider
in a separate class file? And what was the problem with Glide? May also help to see the layout file foritem_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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Is
ViewHolderSlider
in a separate class file? And what was the problem with Glide? May also help to see the layout file foritem_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