Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import android.widget.AdapterView;
import android.widget.GridView;

import com.daimajia.swipe.implments.SwipeItemMangerImpl;
import com.daimajia.swipe.util.Attributes;
import com.daimajia.swipedemo.adapter.GridViewAdapter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import android.widget.Toast;

import com.daimajia.swipe.SwipeLayout;
import com.daimajia.swipe.implments.SwipeItemMangerImpl;
import com.daimajia.swipe.util.Attributes;
import com.daimajia.swipedemo.adapter.ListViewAdapter;

Expand Down
12 changes: 7 additions & 5 deletions demo/src/main/java/com/daimajia/swipedemo/MyActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ protected void onCreate(Bundle savedInstanceState) {

sample1 = (SwipeLayout) findViewById(R.id.sample1);
sample1.setShowMode(SwipeLayout.ShowMode.PullOut);
// sample1.setDragEdges(SwipeLayout.DragEdge.Left, SwipeLayout.DragEdge.Right, SwipeLayout.DragEdge.Top);
// When using multiple drag edges it's a good idea to pass the ids of the views that you're using for the left, right, top bottom views (-1 if you're not using a particular view)
sample1.setBottomViewIds(R.id.bottom_wrapper, R.id.bottom_wrapper_2, R.id.starbott, R.id.starbott);
View starBottView = sample1.findViewById(R.id.starbott);
sample1.addDrag(SwipeLayout.DragEdge.Left, sample1.findViewById(R.id.bottom_wrapper));
sample1.addDrag(SwipeLayout.DragEdge.Right, sample1.findViewById(R.id.bottom_wrapper_2));
sample1.addDrag(SwipeLayout.DragEdge.Top, starBottView);
sample1.addDrag(SwipeLayout.DragEdge.Bottom, starBottView);
sample1.addRevealListener(R.id.delete, new SwipeLayout.OnRevealListener() {
@Override
public void onReveal(View child, SwipeLayout.DragEdge edge, float fraction, int distance) {
Expand Down Expand Up @@ -90,7 +92,7 @@ public void onReveal(View child, SwipeLayout.DragEdge edge, float fraction, int

sample2 = (SwipeLayout) findViewById(R.id.sample2);
sample2.setShowMode(SwipeLayout.ShowMode.LayDown);
sample2.setDragEdge(SwipeLayout.DragEdge.Right);
sample2.addDrag(SwipeLayout.DragEdge.Right, sample2.findViewWithTag("Bottom2"));
// sample2.setShowMode(SwipeLayout.ShowMode.PullOut);
sample2.findViewById(R.id.star).setOnClickListener(new View.OnClickListener() {
@Override
Expand Down Expand Up @@ -129,7 +131,7 @@ public void onClick(View v) {
//sample3

sample3 = (SwipeLayout) findViewById(R.id.sample3);
sample3.setDragEdge(SwipeLayout.DragEdge.Top);
sample3.addDrag(SwipeLayout.DragEdge.Top, sample3.findViewWithTag("Bottom3"));
sample3.addRevealListener(R.id.bottom_wrapper_child1, new SwipeLayout.OnRevealListener() {
@Override
public void onReveal(View child, SwipeLayout.DragEdge edge, float fraction, int distance) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.app.ActionBar;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
Expand Down