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


Java DragSortListView.setOnItemClickListener方法代码示例

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


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

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

示例4: onCreate

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

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

      int imageThumbSize = getResources().getDimensionPixelSize(R.dimen.image_thumbnail_size);
      
      ImageCache.ImageCacheParams cacheParams =
  			new ImageCache.ImageCacheParams(this, IMAGE_CACHE_DIR);

  	cacheParams.setMemCacheSizePercent(0.25f); // Set memory cache to 25% of app memory

  	// The ImageFetcher takes care of loading images into our ImageView children asynchronously
  	mImageFetcher = new DatabaseImageResizer(this, imageThumbSize);
  	mImageFetcher.setLoadingImage(R.drawable.albumart_mp_unknown_list);
  	mImageFetcher.addImageCache(getSupportFragmentManager(), cacheParams);
      
      mPreferences = PreferenceManager.getDefaultSharedPreferences(this);
      
      mList = (DragSortListView) findViewById(android.R.id.list);
      mList.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(mList);
controller.setDragInitMode(DragSortController.ON_DRAG);
controller.setDragHandleId(R.id.drag);
mList.setOnTouchListener(controller);
mList.setOnCreateContextMenuListener(this);

      mAdapter = (TrackListAdapter) getLastCustomNonConfigurationInstance();
      
      if (mAdapter != null) {
          mAdapter.setActivity(this);
          mList.setAdapter(mAdapter);
      }
      
      mToken = MusicUtils.bindToService(this, this);
  }
 
开发者ID:wseemann,项目名称:ServeStream,代码行数:74,代码来源:NowPlayingActivity.java

示例5: onCreate

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