daimajia / daimajia/AndroidSwipeLayout
Set drag edge as Top but can still drag to the left
- Dominant language
- Java
- Stars
- 12.3k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
I set drag edge as Top and work successful, but it can still drag to the left , can anyone help me?
thx~
# XML
```
```
# TestActivity.java
```
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_test);
SwipeLayout swipeLayout = (SwipeLayout) findViewById(R.id.sample1);
//set show mode.
swipeLayout.setShowMode(SwipeLayout.ShowMode.LayDown);
//add drag edge.(If the BottomView has 'layout_gravity' attribute, this line is unnecessary)
swipeLayout.addDrag(SwipeLayout.DragEdge.Top, findViewById(R.id.bottom_wrapper));
swipeLayout.addSwipeListener(new SwipeLayout.SwipeListener()
{
@Override
public void onClose(SwipeLayout layout)
{
//when the SurfaceView totally cover the BottomView.
}
@Override
public void onUpdate(SwipeLayout layout, int leftOffset, int topOffset)
{
//you are swiping.
}
@Override
public void onStartOpen(SwipeLayout layout)
{
}
@Override
public void onOpen(SwipeLayout layout)
{
//when the BottomView totally show.
}
@Override
public void onStartClose(SwipeLayout layout)
{
}
@Override
public void onHandRelease(SwipeLayout layout, float xvel, float yvel)
{
//when user's hand released.
}
});
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.