fix error status in GridView
This commit is contained in:
parent
5686835354
commit
5106665d73
|
|
@ -40,7 +40,7 @@ public class MyActivity extends Activity {
|
|||
|
||||
sample2 = (SwipeLayout)findViewById(R.id.sample2);
|
||||
sample2.setShowMode(SwipeLayout.ShowMode.LayDown);
|
||||
sample2.setShowMode(SwipeLayout.ShowMode.PullOut);
|
||||
// sample2.setShowMode(SwipeLayout.ShowMode.PullOut);
|
||||
sample2.findViewById(R.id.star).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
|
|
@ -68,6 +68,27 @@ public class MyActivity extends Activity {
|
|||
Toast.makeText(MyActivity.this, "Yo",Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
sample1.addSwipeListener(new SwipeLayout.SwipeListener() {
|
||||
@Override
|
||||
public void onClose(SwipeLayout layout) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(SwipeLayout layout, int leftOffset, int topOffset) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOpen(SwipeLayout layout) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHandRelease(SwipeLayout layout, float xvel, float yvel) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
//sample3
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ public abstract class SwipeAdapter extends BaseAdapter {
|
|||
OnLayoutListener onLayoutListener = new OnLayoutListener(position);
|
||||
SwipeMemory swipeMemory = new SwipeMemory(position);
|
||||
swipeLayout.addSwipeListener(swipeMemory);
|
||||
swipeLayout.addOnLayoutListener(onLayoutListener);
|
||||
swipeLayout.setTag(swipeResourceId, new ValueBox(position, swipeMemory, onLayoutListener));
|
||||
}
|
||||
}else{
|
||||
|
|
@ -58,7 +59,6 @@ public abstract class SwipeAdapter extends BaseAdapter {
|
|||
valueBox.position = position;
|
||||
}
|
||||
}
|
||||
swipeLayout.addOnLayoutListener(new OnLayoutListener(position));
|
||||
fillValues(position, v);
|
||||
return v;
|
||||
}
|
||||
|
|
@ -89,7 +89,6 @@ public abstract class SwipeAdapter extends BaseAdapter {
|
|||
|
||||
@Override
|
||||
public void onLayout(SwipeLayout v) {
|
||||
v.removeOnLayoutListener(this);
|
||||
if(mOpenPositions.contains(position))
|
||||
v.open(false);
|
||||
else{
|
||||
|
|
|
|||
Loading…
Reference in New Issue