Android Open Source - ListView-Swipe-to-Delete Main Activity






From Project

Back to project page ListView-Swipe-to-Delete.

License

The source code is released under:

Apache License

If you think the Android project ListView-Swipe-to-Delete 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.skd.swipetodelete;
//from  w  ww.j av  a2  s.  c o  m
import com.skd.swipetodelete.explist.MainExpListActivity;
import com.skd.swipetodelete.list.MainListActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/*
 * Main activity class. 
 */

public class MainActivity extends Activity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    
    ((Button) findViewById(R.id.listDemoBtn)).setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        launchListViewDemo();
      }
    });
    
    ((Button) findViewById(R.id.expListDemoBtn)).setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        launchExpandableListViewDemo();
      }
    });
  }
  
  private void launchListViewDemo() {
    Intent i = new Intent(MainActivity.this, MainListActivity.class);
    startActivity(i);
  }
  
  private void launchExpandableListViewDemo() {
    Intent i = new Intent(MainActivity.this, MainExpListActivity.class);
    startActivity(i);
  }
}




Java Source Code List

com.skd.swipetodelete.ItemBase.java
com.skd.swipetodelete.Item.java
com.skd.swipetodelete.MainActivity.java
com.skd.swipetodelete.explist.ItemBaseExpListAdapter.java
com.skd.swipetodelete.explist.ItemBaseExpListHandler.java
com.skd.swipetodelete.explist.ItemExpListAdapter.java
com.skd.swipetodelete.explist.ItemExpListGestureDetector.java
com.skd.swipetodelete.explist.ItemExpListManager.java
com.skd.swipetodelete.explist.MainExpListActivity.java
com.skd.swipetodelete.list.ItemBaseListAdapter.java
com.skd.swipetodelete.list.ItemBaseListHandler.java
com.skd.swipetodelete.list.ItemListAdapter.java
com.skd.swipetodelete.list.ItemListGestureDetector.java
com.skd.swipetodelete.list.ItemListManager.java
com.skd.swipetodelete.list.MainListActivity.java
com.skd.swipetodelete.menu.MenuItemBuilder.java
com.skd.swipetodelete.menu.MenuItemDesc.java
com.skd.swipetodelete.shake.ShakeDetectActivityListener.java
com.skd.swipetodelete.shake.ShakeDetectActivity.java
com.skd.swipetodelete.utils.DimenUtils.java