luckybilly / luckybilly/SmartSwipe
手指开始右滑的时候,给一个imageview.setImageResource更换图片然后再取消右滑,整个页面所有第一次view.setvisible(VISIBLE)操作view将显示不出来
- Dominant language
- Java
- Stars
- 2.1k
- Forks
- 257
- PR merge metrics
- No merged PRs in 30d
Description
### 问题描述
复现步骤: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:谁解决了,希望下面评论和我说下,谢谢
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the sequence using SmartSwipe.wrap, ActivitySlidingBackConsumer, onSwipeAccepted, and onClosed: change the ImageView resource during the accepted swipe, cancel it, then call setVisibility(VISIBLE) on a view initially set to GONE. Compare that behavior with an initially INVISIBLE view and verify that the GONE view becomes visible after the swipe is cancelled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100