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


Java DragSortListView.setDragEnabled方法代码示例

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


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

示例1: onCreateView

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
	public View onCreateView(LayoutInflater inflater,
			@Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		view = inflater.inflate(R.layout.right_behind, null);
		initData();
		adapter = new RightCheckAdapter(getActivity(),l);
		list = (DragSortListView) view.findViewById(R.id.check_list);
		list.setDropListener(onDrop);
		list.setDragEnabled(true);
//		
//		
		try {
			list.setAdapter(adapter);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		list.setOnItemClickListener(new ListButtonListener());
		
		setListViewHeightBasedOnChildren(list);
		
		return view;
	}
 
开发者ID:lnfscj,项目名称:webbroserBaiDu,代码行数:25,代码来源:RightFragment.java

示例2: onCreateView

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
	View v = inflater.inflate(R.layout.panels_order_prefs_layout, container, false);
	DragSortListView dragList = (DragSortListView) v.findViewById(android.R.id.list);
	List<String> panelsOrder = PanelsOrderResolver.getPanelsOrder(getActivity());
	mAdapter = new PanelsDragAdapter(getActivity().getApplicationContext(), 
			R.layout.toggles_list_item, R.id.list_item_text, 
			panelsOrder);
	
	dragList.setAdapter(mAdapter);
	dragList.setDropListener(new DropListener() {
		@Override
		public void drop(int from, int to) {
			String item = mAdapter.getItem(from);
			mAdapter.remove(item);
			mAdapter.insert(item, to);
			PanelsOrderEditor.savePanelsOrder(getActivity(), mAdapter.getList());
		}
	});

	DragSortController controller = new DragSortController(dragList);
	controller.setDragHandleId(R.id.list_item_image);
	controller.setRemoveEnabled(false);
	controller.setSortEnabled(true);
	controller.setDragInitMode(DragSortController.ON_DRAG);

	dragList.setFloatViewManager(controller);
	dragList.setOnTouchListener(controller);
	dragList.setDragEnabled(true);

	SimpleFloatViewManager simpleFloatViewManager = new SimpleFloatViewManager(dragList);
	simpleFloatViewManager.setBackgroundColor(Color.TRANSPARENT);
	dragList.setFloatViewManager(simpleFloatViewManager);
	
	return v;
}
 
开发者ID:hvmunlimited,项目名称:QuickControlPanel,代码行数:37,代码来源:PanelsOrderPrefsFragment.java

示例3: onViewCreated

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    listView = (DragSortListView)view.findViewById(R.id.pnp_list_view);
    listView.setEmptyView(view.findViewById(R.id.pnp_empty_view));
    listView.setOnItemClickListener(this);
    listView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
    listView.setDragEnabled(false);
}
 
开发者ID:lenworthrose,项目名称:music-app,代码行数:11,代码来源:PlayingNowPlaylistFragment.java

示例4: onCreateView

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
/** Called when the activity is first created. */
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
        Bundle savedInstanceState) {
    mDslv = (DragSortListView) inflater.inflate(getLayout(), container, false);

    mController = buildController(mDslv);
    mDslv.setFloatViewManager(mController);
    mDslv.setOnTouchListener(mController);
    mDslv.setDragEnabled(dragEnabled);

    return mDslv;
}
 
开发者ID:newmanchen,项目名称:ShortcutBar,代码行数:14,代码来源:DSLVFragment.java

示例5: onEnabledOkClick

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
public void onEnabledOkClick(boolean drag, boolean sort, boolean remove) {
    mSortEnabled = sort;
    mRemoveEnabled = remove;
    mDragEnabled = drag;
    DSLVFragment f = (DSLVFragment) getSupportFragmentManager().findFragmentByTag(mTag);
    DragSortListView dslv = (DragSortListView) f.getListView();
    f.getController().setRemoveEnabled(remove);
    f.getController().setSortEnabled(sort);
    dslv.setDragEnabled(drag);
}
 
开发者ID:newmanchen,项目名称:ShortcutBar,代码行数:12,代码来源:TestBedDSLV.java

示例6: onCreateView

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
	super.onCreateView(inflater, container, savedInstanceState);
	View v = inflater.inflate(R.layout.dragsort_list, container,false);
	mList = (DragSortListView) v.findViewById(R.id.dslist);
	mReboot = (Button) v.findViewById(R.id.reboot);
	mCancel = (Button) v.findViewById(R.id.cancel);
	mReboot.setOnClickListener(this);
	mCancel.setOnClickListener(this);
	mList.setEmptyView(v.findViewById(R.id.empty));
	list = new ArrayList<String>();
	names = new ArrayList<String>();
	values = new ArrayList<String>();
	backupString = new ArrayList<String>();

	for(int i=0; i<10; i++) {
		list.add("TEST "+i);
	}

	mAdapter = new RecoveryBaseAdapter(mContext, names, values);

	mList.setAdapter(mAdapter);
	mList.setDropListener(onDrop);
	mList.setRemoveListener(onRemove);

	DragSortController controller = new DragSortController(mList);
	controller.setDragHandleId(R.id.image);
	//controller.setClickRemoveId(R.id.);
	controller.setRemoveEnabled(true);
	controller.setSortEnabled(true);
	controller.setDragInitMode(1);
	controller.setFlingHandleId(R.id.item_container);
	//controller.setRemoveMode(removeMode);

	mList.setFloatViewManager(controller);
	mList.setOnTouchListener(controller);
	mList.setDragEnabled(true);
	checkEmptyList();
	return v;
}
 
开发者ID:cesco89,项目名称:android-kernel-tweaker,代码行数:41,代码来源:CustomRecoveryCommandFragment.java

示例7: onCreateView

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@SuppressLint("ClickableViewAccessibility")
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
	listView = (DragSortListView) inflater.inflate(R.layout.act_route_edit, container, false);

	dragController = buildController(listView);
	listView.setFloatViewManager(dragController);
	listView.setOnTouchListener(dragController);
	listView.setOnItemClickListener(clickListener);
	listView.setDragEnabled(true);

	return listView;
}
 
开发者ID:andreynovikov,项目名称:Androzic,代码行数:15,代码来源:RouteEdit.java


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