Skip to content

手指开始右滑的时候,给一个imageview.setImageResource更换图片然后再取消右滑,整个页面所有第一次view.setvisible(VISIBLE)操作view将显示不出来 #86

@LvBing1995

Description

@LvBing1995

问题描述

复现步骤:1.xml布局中添加三个控件第一个是button,第二个随便再添加一个viewA(xml布局中设置VIEW.GONE),点击button的作用是显示隐藏viewA,第三个是Imageview,然后给imageview随便设置一张图片androdi:src="xxx图片“
2.进入整个页面的时候其他地方不操作,手指开始侧滑,onSwipeAccepted方法中给imageview.setImageResource(yyyy图片)设置成另外一张图片,然后再取消侧滑onClosed方法中把imageview.setImageResource(xxx图片)设置回去。
3.这个时候去点击button,viewA调用了setvisible(VISIBLE)但是无法显示,但是如果第一步骤的时候xml中viewA设置的不是GONE而是INVISIBLE那么如此操作viewA是可以显示的。
备注: 使用侧滑代码:mSmartSwipeWrapper = SmartSwipe.wrap(this);
mSwipeConsumer = mSmartSwipeWrapper.removeAllConsumers()
.addConsumer(new ActivitySlidingBackConsumer())
.setScrimColor(0x7F000000)
.enableLeft();
导入库: implementation 'com.billy.android:smart-swipe-x:1.1.0'
implementation 'com.billy.android:smart-swipe:1.1.0'
ps:谁解决了,希望下面评论和我说下,谢谢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions