当前位置: 首页>>代码示例>>Java>>正文


Java DragSortController.setRemoveMode方法代码示例

本文整理汇总了Java中com.mobeta.android.dslv.DragSortController.setRemoveMode方法的典型用法代码示例。如果您正苦于以下问题:Java DragSortController.setRemoveMode方法的具体用法?Java DragSortController.setRemoveMode怎么用?Java DragSortController.setRemoveMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.mobeta.android.dslv.DragSortController的用法示例。


在下文中一共展示了DragSortController.setRemoveMode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onActivityCreated

import com.mobeta.android.dslv.DragSortController; //导入方法依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    setupFragmentData();
    mListView.setOnCreateContextMenuListener(this);
    mListView.setOnItemClickListener(this);
    mListView.setAdapter(mAdapter);
    DragSortController controller = new DragSortController(mListView);
    //设置拖拽控件
    controller.setDragHandleId(R.id.listview_drag_handle);
    controller.setRemoveEnabled(true);
    controller.setRemoveMode(1);
    mListView.setFloatViewManager(controller);
    mListView.setOnTouchListener(controller);
    getLoaderManager().initLoader(0, null, this);
}
 
开发者ID:cpoopc,项目名称:com.cp.monsterMod,代码行数:17,代码来源:DragSortListViewFragment.java

示例2: onCreate

import com.mobeta.android.dslv.DragSortController; //导入方法依赖的package包/类
@Override
public void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_organize_urls);
	
	ActionBar actionBar = getSupportActionBar();
	actionBar.setDisplayHomeAsUpEnabled(true);
	
	DragSortListView list = (DragSortListView) getListView();
	list.setDropListener(dropListener);
	list.setRemoveListener(removeListener);

	DragSortController controller = new DragSortController(list);
	controller.setDragInitMode(DragSortController.ON_DRAG);
	controller.setRemoveMode(DragSortController.FLING_REMOVE);
       controller.setRemoveEnabled(true);
	controller.setDragHandleId(R.id.drag_handle);
	list.setOnTouchListener(controller);
	
	mAdapter = new OrganizeAdapter(this, new ArrayList<UriBean>());
	setListAdapter(mAdapter);
}
 
开发者ID:minstrelsy,项目名称:servestream,代码行数:23,代码来源:OrganizeUrlsActivity.java

示例3: buildController

import com.mobeta.android.dslv.DragSortController; //导入方法依赖的package包/类
/**
 * Called in onCreateView. Override this to provide a custom
 * DragSortController.
 */
public DragSortController buildController(DragSortListView dslv) {
    // defaults are
    //   dragStartMode = onDown
    //   removeMode = flingRight
    DragSortController controller = new DragSortController(dslv);
    controller.setDragHandleId(R.id.drag_handle);
    controller.setClickRemoveId(R.id.click_remove);
    controller.setRemoveEnabled(removeEnabled);
    controller.setSortEnabled(sortEnabled);
    controller.setDragInitMode(dragStartMode);
    controller.setRemoveMode(removeMode);
    return controller;
}
 
开发者ID:newmanchen,项目名称:ShortcutBar,代码行数:18,代码来源:DSLVFragment.java

示例4: onActivityCreated

import com.mobeta.android.dslv.DragSortController; //导入方法依赖的package包/类
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    setupFragmentData();
    mListView.setOnCreateContextMenuListener(this);
    mListView.setOnItemClickListener(this);
    mListView.setAdapter(mAdapter);
    DragSortController controller = new DragSortController(mListView);
    controller.setDragHandleId(R.id.listview_drag_handle);
    controller.setRemoveEnabled(true);
    controller.setRemoveMode(1);
    mListView.setFloatViewManager(controller);
    mListView.setOnTouchListener(controller);
    getLoaderManager().initLoader(0, null, this);
}
 
开发者ID:C-Aniruddh,项目名称:xPlodMusic,代码行数:16,代码来源:DragSortListViewFragment.java

示例5: buildController

import com.mobeta.android.dslv.DragSortController; //导入方法依赖的package包/类
/**
 * Called in onCreateView. Override this to provide a custom
 * DragSortController.
 */
protected DragSortController buildController(DragSortListView dslv)
{
	DragSortController controller = new DragSortController(dslv);
	controller.setDragHandleId(R.id.drag_handle);
	// controller.setClickRemoveId(R.id.click_remove);
	controller.setRemoveEnabled(true);
	controller.setSortEnabled(true);
	controller.setDragInitMode(DragSortController.ON_DOWN);
	controller.setRemoveMode(DragSortController.FLING_REMOVE);
	return controller;
}
 
开发者ID:andreynovikov,项目名称:Androzic,代码行数:16,代码来源:RouteEdit.java

示例6: onCreate

import com.mobeta.android.dslv.DragSortController; //导入方法依赖的package包/类
/** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle icicle) {
      super.onCreate(icicle);
      setContentView(R.layout.activity_now_playing);

ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayHomeAsUpEnabled(true);
      
      setVolumeControlStream(AudioManager.STREAM_MUSIC);

      mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
      
      DragSortListView list = (DragSortListView) getListView();
list.setOnItemClickListener(new OnItemClickListener() {
	@Override
	public void onItemClick(AdapterView<?> arg0, View arg1, int position,
			long arg3) {
		if (mTrackCursor.getCount() == 0) {
            return;
        }
        
        // When selecting a track from the queue, just jump there instead of
        // reloading the queue. This is both faster, and prevents accidentally
        // dropping out of party shuffle.
        if (MusicUtils.sService != null) {
            try {
                int queuePosition = MusicUtils.sService.getQueuePosition();
                	
                if (position == queuePosition) {
                	if (MusicUtils.sService.isPlaying()) {
                        MusicUtils.sService.pause();
                    } else {
                        MusicUtils.sService.play();
                    }
                } else {
                	MusicUtils.sService.setQueuePosition(position);
                }
            } catch (RemoteException ex) {
            }
        }
		
	}
});

   DragSortController controller = new DragSortController(list);
controller.setDragInitMode(DragSortController.ON_DRAG);
controller.setRemoveMode(DragSortController.FLING_REMOVE);
      controller.setRemoveEnabled(true);
controller.setDragHandleId(R.id.drag);
list.setOnTouchListener(controller);
list.setOnCreateContextMenuListener(this);

      mAdapter = (TrackListAdapter) getLastNonConfigurationInstance();
      
      if (mAdapter != null) {
          mAdapter.setActivity(this);
          setListAdapter(mAdapter);
      }
      
      mToken = MusicUtils.bindToService(this, this);
  }
 
开发者ID:minstrelsy,项目名称:servestream,代码行数:63,代码来源:NowPlayingActivity.java


注:本文中的com.mobeta.android.dslv.DragSortController.setRemoveMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。