Android Open Source - AndroidSwipeLayout Nested Example






From Project

Back to project page AndroidSwipeLayout.

License

The source code is released under:

MIT License

If you think the Android project AndroidSwipeLayout listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.daimajia.swipedemo;
//  w  w w  .  j  a  va  2s .  c  o m
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.daimajia.swipe.SwipeLayout;

public class NestedExample extends Activity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.complicate_layout);
         SwipeLayout swipeLayout = (SwipeLayout)findViewById(R.id.test_swipe_swipe);
        swipeLayout.setOnDoubleClickListener(new SwipeLayout.DoubleClickListener() {
            @Override
            public void onDoubleClick(SwipeLayout layout, boolean surface) {
                Toast.makeText(getApplicationContext(), "DoubleClick", Toast.LENGTH_SHORT).show();
            }
        });
        swipeLayout.findViewById(R.id.trash).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(getApplicationContext(), "Click", Toast.LENGTH_SHORT).show();
            }
        });
    }


}




Java Source Code List

com.daimajia.swipe.SimpleSwipeListener.java
com.daimajia.swipe.SwipeLayout.java
com.daimajia.swipe.adapters.ArraySwipeAdapter.java
com.daimajia.swipe.adapters.BaseSwipeAdapter.java
com.daimajia.swipe.adapters.CursorSwipeAdapter.java
com.daimajia.swipe.adapters.SimpleCursorSwipeAdapter.java
com.daimajia.swipe.implments.SwipeItemMangerImpl.java
com.daimajia.swipe.interfaces.SwipeAdapterInterface.java
com.daimajia.swipe.interfaces.SwipeItemMangerInterface.java
com.daimajia.swipedemo.GridViewExample.java
com.daimajia.swipedemo.ListViewExample.java
com.daimajia.swipedemo.MyActivity.java
com.daimajia.swipedemo.NestedExample.java
com.daimajia.swipedemo.adapter.ArraySwipeAdapterSample.java
com.daimajia.swipedemo.adapter.GridViewAdapter.java
com.daimajia.swipedemo.adapter.ListViewAdapter.java