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


Java DragSortListView.setRemoveListener方法代码示例

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


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

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

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

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

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

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

示例8: 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.setRemoveListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。