ViewPager in moto x4 not working properly

Multi tool use
I am using viewpager
for displaying 3 screens like introductory screens. It is working fine on all phones, but not working properly in Moto X4. These are the screenshots from Moto X4 :
This is the xml code :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
android:visibility="visible"
android:weightSum="1">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="0dip"
android:layout_weight="0.7">
<LinearLayout
android:id="@+id/viewpager_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/login_slide_viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
<android.support.design.widget.TabLayout
android:id="@+id/login_tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/viewpager_container"
app:tabBackground="@drawable/login_dot_selector"
app:tabGravity="center"
app:tabIndicatorHeight="0dp"
app:tabRippleColor="@null"
app:tabPaddingStart="7dp"
app:tabPaddingEnd="7dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.3"
android:orientation="vertical"
>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/warm_grey" />
<LinearLayout
android:id="@+id/login_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible"
android:orientation="vertical">
<LinearLayout
android:id="@+id/bt_fb_login"
android:layout_width="232dp"
android:layout_height="53dp"
android:background="@drawable/facebook_button_background"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.sharesmile.share.views.MRTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/logn_with_fb"
android:textAllCaps="true"
android:textColor="@color/white_95"
android:textSize="12.5sp" />
<ImageView
android:layout_width="47dp"
android:layout_height="47dp"
android:src="@drawable/logo_fb" />
</LinearLayout>
<LinearLayout
android:id="@+id/bt_google_login"
android:layout_width="232dp"
android:layout_height="53dp"
android:layout_marginTop="13dp"
android:background="@drawable/google_button_background"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.sharesmile.share.views.MRTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/logn_with_google"
android:textAllCaps="true"
android:textColor="@color/white_95"
android:textSize="13.4sp" />
<ImageView
android:layout_width="47dp"
android:layout_height="47dp"
android:background="@drawable/login_google"
android:src="@drawable/google_icon"
/>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/progress_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:visibility="gone">
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
Java code :
public class LoginSliderAdapter extends PagerAdapter {
public int slider_videos = {
R.raw.v1,
R.raw.v2,
R.raw.v3
};
@BindView(R.id.iv_slider_image)
VideoView sliderImage;
@BindView(R.id.tv_slider_title)
TextView sliderTitle;
@BindView(R.id.tv_slider_description)
TextView sliderDescription;
Context context;
LayoutInflater layoutInflater;
public LoginSliderAdapter(Context context) {
this.context = context;
}
@Override
public int getCount() {
return 3;
}
@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
return view == o;
}
@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
layoutInflater = (LayoutInflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
View view = layoutInflater.inflate(R.layout.login_slider, container, false);
ButterKnife.bind(this, view);
setVideoToVideoPlayer(position);
sliderTitle.setText(context.getResources().getStringArray(R.array.login_tiles)[position]);
sliderDescription.setText(context.getResources().getStringArray(R.array.login_desc)[position]);
container.addView(view);
return view;
}
private void setVideoToVideoPlayer(int position) {
Uri uri = Uri.parse("android.resource://com.sharesmile.share/"
+ slider_videos[position]);
sliderImage.setBackgroundColor(Color.TRANSPARENT);
sliderImage.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
sliderImage.setVideoURI(uri);
sliderImage.requestFocus();
sliderImage.setZOrderOnTop(true);
sliderImage.start();
}
@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
container.removeView((LinearLayout) object);
}
}
So what is this issue, not able to figure out and never so this issue.

add a comment |
I am using viewpager
for displaying 3 screens like introductory screens. It is working fine on all phones, but not working properly in Moto X4. These are the screenshots from Moto X4 :
This is the xml code :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
android:visibility="visible"
android:weightSum="1">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="0dip"
android:layout_weight="0.7">
<LinearLayout
android:id="@+id/viewpager_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/login_slide_viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
<android.support.design.widget.TabLayout
android:id="@+id/login_tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/viewpager_container"
app:tabBackground="@drawable/login_dot_selector"
app:tabGravity="center"
app:tabIndicatorHeight="0dp"
app:tabRippleColor="@null"
app:tabPaddingStart="7dp"
app:tabPaddingEnd="7dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.3"
android:orientation="vertical"
>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/warm_grey" />
<LinearLayout
android:id="@+id/login_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible"
android:orientation="vertical">
<LinearLayout
android:id="@+id/bt_fb_login"
android:layout_width="232dp"
android:layout_height="53dp"
android:background="@drawable/facebook_button_background"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.sharesmile.share.views.MRTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/logn_with_fb"
android:textAllCaps="true"
android:textColor="@color/white_95"
android:textSize="12.5sp" />
<ImageView
android:layout_width="47dp"
android:layout_height="47dp"
android:src="@drawable/logo_fb" />
</LinearLayout>
<LinearLayout
android:id="@+id/bt_google_login"
android:layout_width="232dp"
android:layout_height="53dp"
android:layout_marginTop="13dp"
android:background="@drawable/google_button_background"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.sharesmile.share.views.MRTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/logn_with_google"
android:textAllCaps="true"
android:textColor="@color/white_95"
android:textSize="13.4sp" />
<ImageView
android:layout_width="47dp"
android:layout_height="47dp"
android:background="@drawable/login_google"
android:src="@drawable/google_icon"
/>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/progress_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:visibility="gone">
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
Java code :
public class LoginSliderAdapter extends PagerAdapter {
public int slider_videos = {
R.raw.v1,
R.raw.v2,
R.raw.v3
};
@BindView(R.id.iv_slider_image)
VideoView sliderImage;
@BindView(R.id.tv_slider_title)
TextView sliderTitle;
@BindView(R.id.tv_slider_description)
TextView sliderDescription;
Context context;
LayoutInflater layoutInflater;
public LoginSliderAdapter(Context context) {
this.context = context;
}
@Override
public int getCount() {
return 3;
}
@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
return view == o;
}
@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
layoutInflater = (LayoutInflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
View view = layoutInflater.inflate(R.layout.login_slider, container, false);
ButterKnife.bind(this, view);
setVideoToVideoPlayer(position);
sliderTitle.setText(context.getResources().getStringArray(R.array.login_tiles)[position]);
sliderDescription.setText(context.getResources().getStringArray(R.array.login_desc)[position]);
container.addView(view);
return view;
}
private void setVideoToVideoPlayer(int position) {
Uri uri = Uri.parse("android.resource://com.sharesmile.share/"
+ slider_videos[position]);
sliderImage.setBackgroundColor(Color.TRANSPARENT);
sliderImage.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
sliderImage.setVideoURI(uri);
sliderImage.requestFocus();
sliderImage.setZOrderOnTop(true);
sliderImage.start();
}
@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
container.removeView((LinearLayout) object);
}
}
So what is this issue, not able to figure out and never so this issue.

Can you elaborate on the problem? From what I can tell, it's the images on the 2nd page that are not being displayed properly or is there more to it?
– Nero
yesterday
as you can see in second and 3rd image it is showing the other images. which are not supposed to be seen
– Parth Anjaria
yesterday
Can you please share your xml + java code responsible for this functionality?
– Nero
yesterday
Added code @Nero
– Parth Anjaria
yesterday
Try using fragments(Pager Adapter)
– S.P
yesterday
add a comment |
I am using viewpager
for displaying 3 screens like introductory screens. It is working fine on all phones, but not working properly in Moto X4. These are the screenshots from Moto X4 :
This is the xml code :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
android:visibility="visible"
android:weightSum="1">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="0dip"
android:layout_weight="0.7">
<LinearLayout
android:id="@+id/viewpager_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/login_slide_viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
<android.support.design.widget.TabLayout
android:id="@+id/login_tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/viewpager_container"
app:tabBackground="@drawable/login_dot_selector"
app:tabGravity="center"
app:tabIndicatorHeight="0dp"
app:tabRippleColor="@null"
app:tabPaddingStart="7dp"
app:tabPaddingEnd="7dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.3"
android:orientation="vertical"
>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/warm_grey" />
<LinearLayout
android:id="@+id/login_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible"
android:orientation="vertical">
<LinearLayout
android:id="@+id/bt_fb_login"
android:layout_width="232dp"
android:layout_height="53dp"
android:background="@drawable/facebook_button_background"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.sharesmile.share.views.MRTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/logn_with_fb"
android:textAllCaps="true"
android:textColor="@color/white_95"
android:textSize="12.5sp" />
<ImageView
android:layout_width="47dp"
android:layout_height="47dp"
android:src="@drawable/logo_fb" />
</LinearLayout>
<LinearLayout
android:id="@+id/bt_google_login"
android:layout_width="232dp"
android:layout_height="53dp"
android:layout_marginTop="13dp"
android:background="@drawable/google_button_background"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.sharesmile.share.views.MRTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/logn_with_google"
android:textAllCaps="true"
android:textColor="@color/white_95"
android:textSize="13.4sp" />
<ImageView
android:layout_width="47dp"
android:layout_height="47dp"
android:background="@drawable/login_google"
android:src="@drawable/google_icon"
/>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/progress_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:visibility="gone">
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
Java code :
public class LoginSliderAdapter extends PagerAdapter {
public int slider_videos = {
R.raw.v1,
R.raw.v2,
R.raw.v3
};
@BindView(R.id.iv_slider_image)
VideoView sliderImage;
@BindView(R.id.tv_slider_title)
TextView sliderTitle;
@BindView(R.id.tv_slider_description)
TextView sliderDescription;
Context context;
LayoutInflater layoutInflater;
public LoginSliderAdapter(Context context) {
this.context = context;
}
@Override
public int getCount() {
return 3;
}
@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
return view == o;
}
@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
layoutInflater = (LayoutInflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
View view = layoutInflater.inflate(R.layout.login_slider, container, false);
ButterKnife.bind(this, view);
setVideoToVideoPlayer(position);
sliderTitle.setText(context.getResources().getStringArray(R.array.login_tiles)[position]);
sliderDescription.setText(context.getResources().getStringArray(R.array.login_desc)[position]);
container.addView(view);
return view;
}
private void setVideoToVideoPlayer(int position) {
Uri uri = Uri.parse("android.resource://com.sharesmile.share/"
+ slider_videos[position]);
sliderImage.setBackgroundColor(Color.TRANSPARENT);
sliderImage.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
sliderImage.setVideoURI(uri);
sliderImage.requestFocus();
sliderImage.setZOrderOnTop(true);
sliderImage.start();
}
@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
container.removeView((LinearLayout) object);
}
}
So what is this issue, not able to figure out and never so this issue.

I am using viewpager
for displaying 3 screens like introductory screens. It is working fine on all phones, but not working properly in Moto X4. These are the screenshots from Moto X4 :
This is the xml code :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/white"
android:orientation="vertical"
android:visibility="visible"
android:weightSum="1">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="0dip"
android:layout_weight="0.7">
<LinearLayout
android:id="@+id/viewpager_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical">
<android.support.v4.view.ViewPager
android:id="@+id/login_slide_viewpager"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</LinearLayout>
<android.support.design.widget.TabLayout
android:id="@+id/login_tablayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/viewpager_container"
app:tabBackground="@drawable/login_dot_selector"
app:tabGravity="center"
app:tabIndicatorHeight="0dp"
app:tabRippleColor="@null"
app:tabPaddingStart="7dp"
app:tabPaddingEnd="7dp" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="0.3"
android:orientation="vertical"
>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/warm_grey" />
<LinearLayout
android:id="@+id/login_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:visibility="visible"
android:orientation="vertical">
<LinearLayout
android:id="@+id/bt_fb_login"
android:layout_width="232dp"
android:layout_height="53dp"
android:background="@drawable/facebook_button_background"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.sharesmile.share.views.MRTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/logn_with_fb"
android:textAllCaps="true"
android:textColor="@color/white_95"
android:textSize="12.5sp" />
<ImageView
android:layout_width="47dp"
android:layout_height="47dp"
android:src="@drawable/logo_fb" />
</LinearLayout>
<LinearLayout
android:id="@+id/bt_google_login"
android:layout_width="232dp"
android:layout_height="53dp"
android:layout_marginTop="13dp"
android:background="@drawable/google_button_background"
android:gravity="center_vertical"
android:orientation="horizontal">
<com.sharesmile.share.views.MRTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/logn_with_google"
android:textAllCaps="true"
android:textColor="@color/white_95"
android:textSize="13.4sp" />
<ImageView
android:layout_width="47dp"
android:layout_height="47dp"
android:background="@drawable/login_google"
android:src="@drawable/google_icon"
/>
</LinearLayout>
</LinearLayout>
<RelativeLayout
android:id="@+id/progress_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:visibility="gone">
<ProgressBar
android:id="@+id/progress_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
Java code :
public class LoginSliderAdapter extends PagerAdapter {
public int slider_videos = {
R.raw.v1,
R.raw.v2,
R.raw.v3
};
@BindView(R.id.iv_slider_image)
VideoView sliderImage;
@BindView(R.id.tv_slider_title)
TextView sliderTitle;
@BindView(R.id.tv_slider_description)
TextView sliderDescription;
Context context;
LayoutInflater layoutInflater;
public LoginSliderAdapter(Context context) {
this.context = context;
}
@Override
public int getCount() {
return 3;
}
@Override
public boolean isViewFromObject(@NonNull View view, @NonNull Object o) {
return view == o;
}
@NonNull
@Override
public Object instantiateItem(@NonNull ViewGroup container, int position) {
layoutInflater = (LayoutInflater) context.getSystemService(context.LAYOUT_INFLATER_SERVICE);
View view = layoutInflater.inflate(R.layout.login_slider, container, false);
ButterKnife.bind(this, view);
setVideoToVideoPlayer(position);
sliderTitle.setText(context.getResources().getStringArray(R.array.login_tiles)[position]);
sliderDescription.setText(context.getResources().getStringArray(R.array.login_desc)[position]);
container.addView(view);
return view;
}
private void setVideoToVideoPlayer(int position) {
Uri uri = Uri.parse("android.resource://com.sharesmile.share/"
+ slider_videos[position]);
sliderImage.setBackgroundColor(Color.TRANSPARENT);
sliderImage.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {
@Override
public void onPrepared(MediaPlayer mp) {
mp.setLooping(true);
}
});
sliderImage.setVideoURI(uri);
sliderImage.requestFocus();
sliderImage.setZOrderOnTop(true);
sliderImage.start();
}
@Override
public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) {
container.removeView((LinearLayout) object);
}
}
So what is this issue, not able to figure out and never so this issue.


edited yesterday
asked yesterday
Parth Anjaria
2,09421636
2,09421636
Can you elaborate on the problem? From what I can tell, it's the images on the 2nd page that are not being displayed properly or is there more to it?
– Nero
yesterday
as you can see in second and 3rd image it is showing the other images. which are not supposed to be seen
– Parth Anjaria
yesterday
Can you please share your xml + java code responsible for this functionality?
– Nero
yesterday
Added code @Nero
– Parth Anjaria
yesterday
Try using fragments(Pager Adapter)
– S.P
yesterday
add a comment |
Can you elaborate on the problem? From what I can tell, it's the images on the 2nd page that are not being displayed properly or is there more to it?
– Nero
yesterday
as you can see in second and 3rd image it is showing the other images. which are not supposed to be seen
– Parth Anjaria
yesterday
Can you please share your xml + java code responsible for this functionality?
– Nero
yesterday
Added code @Nero
– Parth Anjaria
yesterday
Try using fragments(Pager Adapter)
– S.P
yesterday
Can you elaborate on the problem? From what I can tell, it's the images on the 2nd page that are not being displayed properly or is there more to it?
– Nero
yesterday
Can you elaborate on the problem? From what I can tell, it's the images on the 2nd page that are not being displayed properly or is there more to it?
– Nero
yesterday
as you can see in second and 3rd image it is showing the other images. which are not supposed to be seen
– Parth Anjaria
yesterday
as you can see in second and 3rd image it is showing the other images. which are not supposed to be seen
– Parth Anjaria
yesterday
Can you please share your xml + java code responsible for this functionality?
– Nero
yesterday
Can you please share your xml + java code responsible for this functionality?
– Nero
yesterday
Added code @Nero
– Parth Anjaria
yesterday
Added code @Nero
– Parth Anjaria
yesterday
Try using fragments(Pager Adapter)
– S.P
yesterday
Try using fragments(Pager Adapter)
– S.P
yesterday
add a comment |
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',
autoActivateHeartbeat: false,
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
});
}
});
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%2f53944036%2fviewpager-in-moto-x4-not-working-properly%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f53944036%2fviewpager-in-moto-x4-not-working-properly%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
BiIVb5 MqIhNnhClO7,yfQG RPmGfKd1e,iAodlvyJ6c,bU,7NuL,q,Em8,Js,6ggUWYd5a b PWQ
Can you elaborate on the problem? From what I can tell, it's the images on the 2nd page that are not being displayed properly or is there more to it?
– Nero
yesterday
as you can see in second and 3rd image it is showing the other images. which are not supposed to be seen
– Parth Anjaria
yesterday
Can you please share your xml + java code responsible for this functionality?
– Nero
yesterday
Added code @Nero
– Parth Anjaria
yesterday
Try using fragments(Pager Adapter)
– S.P
yesterday