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


Java DragSortListView.setDropListener方法代码示例

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


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

示例1: onCreateView

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    super.onCreateView(inflater, container, savedInstanceState);

    mIds = new ArrayList<String>();
    if (savedInstanceState != null) {
        mIds = savedInstanceState.getStringArrayList(SAVED_MEDIA_IDS);
    }

    mGridAdapter = new MediaGalleryAdapter(getActivity(), R.layout.media_gallery_item, null, true,
            MediaImageLoader.getInstance());

    View view = inflater.inflate(R.layout.media_gallery_edit_fragment, container, false);

    DragSortListView gridView = (DragSortListView) view.findViewById(R.id.edit_media_gallery_gridview);
    gridView.setAdapter(mGridAdapter);
    gridView.setOnCreateContextMenuListener(this);
    gridView.setDropListener(this);
    gridView.setRemoveListener(this);
    refreshGridView();

    return view;
}
 
开发者ID:ldsddn,项目名称:wordpress_app_android,代码行数:24,代码来源:MediaGalleryEditFragment.java

示例2: 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

示例3: onCreate

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
 protected void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.checkable_main);
     
     String[] array = getResources().getStringArray(R.array.jazz_artist_names);
     ArrayList<String> arrayList = new ArrayList<String>(Arrays.asList(array));

     adapter = new ArrayAdapter<String>(this, R.layout.list_item_checkable, R.id.text, arrayList);
     
     setListAdapter(adapter);
     
     DragSortListView list = getListView();
     list.setDropListener(onDrop);
     list.setRemoveListener(onRemove);
}
 
开发者ID:newmanchen,项目名称:ShortcutBar,代码行数:17,代码来源:MultipleChoiceListView.java

示例4: onActivityCreated

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

    mDslv = (DragSortListView) getListView(); 

    mDslv.setDropListener(onDrop);
    mDslv.setRemoveListener(onRemove);

    Bundle args = getArguments();
    int headers = 0;
    int footers = 0;
    if (args != null) {
        headers = args.getInt("headers", 0);
        footers = args.getInt("footers", 0);
    }

    for (int i = 0; i < headers; i++) {
        addHeader(getActivity(), mDslv);
    }
    for (int i = 0; i < footers; i++) {
        addFooter(getActivity(), mDslv);
    }

    setListAdapter();
}
 
开发者ID:newmanchen,项目名称:ShortcutBar,代码行数:27,代码来源:DSLVFragment.java

示例5: onCreate

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

    DragSortListView lv = (DragSortListView) getListView(); 

    lv.setDropListener(onDrop);
    lv.setRemoveListener(onRemove);
    lv.setDragScrollProfile(ssProfile);

    array = getResources().getStringArray(R.array.countries);
    list = new ArrayList<String>(Arrays.asList(array));

    adapter = new ArrayAdapter<String>(this, R.layout.list_item_handle_right, R.id.text, list);
    setListAdapter(adapter);
}
 
开发者ID:newmanchen,项目名称:ShortcutBar,代码行数:19,代码来源:WarpDSLV.java

示例6: onCreate

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.sections_main);

    DragSortListView dslv = (DragSortListView) getListView();

    // get jazz artist names and make adapter
    String[] array = getResources().getStringArray(R.array.jazz_artist_names);
    List<String> list = new ArrayList<String>(Arrays.asList(array));
    SectionAdapter adapter = new SectionAdapter(this, list);
    dslv.setDropListener(adapter);

    // make and set controller on dslv
    SectionController c = new SectionController(dslv, adapter);
    dslv.setFloatViewManager(c);
    dslv.setOnTouchListener(c);

    // pass it to the ListActivity
    setListAdapter(adapter);
}
 
开发者ID:newmanchen,项目名称:ShortcutBar,代码行数:22,代码来源:Sections.java

示例7: onCreate

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
 protected void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.checkable_main);
     
     String[] array = getResources().getStringArray(R.array.jazz_artist_names);
     ArrayList<String> arrayList = new ArrayList<String>(Arrays.asList(array));

     adapter = new ArrayAdapter<String>(this, R.layout.list_item_radio, R.id.text, arrayList);
     
     setListAdapter(adapter);
     
     DragSortListView list = getListView();
     list.setDropListener(onDrop);
     list.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
}
 
开发者ID:newmanchen,项目名称:ShortcutBar,代码行数:17,代码来源:SingleChoiceListView.java

示例8: onCreate

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的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

示例9: onCreateView

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

  // Set the adapter
  if (view instanceof DragSortListView) {
    DragSortListView listView = (DragSortListView) view;
    songAdapter = new QueueSongArrayAdapter(songs);
    songAdapter.setNotifyOnChange(false);
    listView.setAdapter(songAdapter);
    listView.setDropListener(new QueueSongDropListener());
  }
  return view;
}
 
开发者ID:BjoernPetersen,项目名称:AndroidMusicBot,代码行数:15,代码来源:SongFragment.java

示例10: inflateListView

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
@Override
protected View inflateListView(final Context context, final QuestionAdapter adapter) {
    View v = View.inflate(context, R.layout.survey_question_container_sortlistview, null);
    listView = (DragSortListView) v.findViewById(R.id.list);
    listView.setDropListener(new DragSortListView.DropListener() {
        @Override
        public void drop(int from, int to) {
            Collections.swap(getVariantsList(), from, to);
            adapter.notifyDataSetChanged();
        }
    });
    return v;
}
 
开发者ID:active-citizen,项目名称:android.java,代码行数:14,代码来源:RankingSurveyQuestion.java

示例11: 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

示例12: onCreate

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

    DragSortListView lv = (DragSortListView) getListView(); 

    lv.setDropListener(onDrop);
    lv.setRemoveListener(onRemove);

    mArtistNames = getResources().getStringArray(R.array.jazz_artist_names);
    mArtistAlbums = getResources().getStringArray(R.array.jazz_artist_albums);

    mArtists = new ArrayList<JazzArtist>();
    JazzArtist ja;
    for (int i = 0; i < mArtistNames.length; ++i) {
      ja = new JazzArtist();
      ja.name = mArtistNames[i];
      if (i < mArtistAlbums.length) {
        ja.albums = mArtistAlbums[i];
      } else {
        ja.albums = "No albums listed";
      }
      mArtists.add(ja);
    }

    adapter = new JazzAdapter(mArtists);
    
    setListAdapter(adapter);

}
 
开发者ID:newmanchen,项目名称:ShortcutBar,代码行数:33,代码来源:ArbItemSizeDSLV.java

示例13: 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

示例14: initListView

import com.mobeta.android.dslv.DragSortListView; //导入方法依赖的package包/类
private void initListView() {
    DragSortListView lv = (DragSortListView) getListView();
    lv.setDropListener(onDrop);
    lv.setRemoveListener(onRemove);
    adapter = new PlaylistListAdapter(this, R.layout.playlist_list_layout,
                                      playlistItems);
    setListAdapter(adapter);
}
 
开发者ID:gpodder,项目名称:detlef,代码行数:9,代码来源:PlaylistActivity.java


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