图片viewpager刷卡 [英] Image viewpager swiping

查看:180
本文介绍了图片viewpager刷卡的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有鉴于寻呼机水平刷卡图像的问题。我使用的通用图像装载机用于显示图像。查看传呼机被定位了重新的故事和关于重新presents故事等的TextView顶部presents称号的TextView下。

I have a problem with swiping images horizontally in view pager. I'm using Universal Image Loader for displaying images. View pager is positioned under the textview that represents title of the story and on top of other textview that represents story.

问题是,刷卡不工作究竟应该如何。每次我尝试刷卡向左或向右,图像刷卡被整个布局的滚动中断。更具体地讲,我活动的布局是滚动(垂直)和我的假设是,滚动莫名其妙地中断viewpager的刷卡。

The problem is that swiping isn't working exactly how it should be. Every time I try to swipe to right or left, the image swiping is interrupted by scrolling of the whole layout. To be more specific, layout of my activity is scrollable (vertically) and my assumption is that scrolling is somehow interrupting swiping of the viewpager.

谢谢!

编辑:
检查我的答案
谢谢

check my answer thanks

推荐答案

找到答案。
只需要禁用滚动型和viewpager之间拦截

Found answer. just needed to disable intercepting between scrollview and viewpager

viewPager.setOnTouchListener(new OnTouchListener() {

        @Override
        public boolean onTouch(View v, MotionEvent event) {
            // TODO Auto-generated method stub
            scrollView.requestDisallowInterceptTouchEvent(true);
            return false;
        }
    });

这篇关于图片viewpager刷卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆