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


Java PauseOnScrollListener类代码示例

本文整理汇总了Java中com.nostra13.universalimageloader.core.listener.PauseOnScrollListener的典型用法代码示例。如果您正苦于以下问题:Java PauseOnScrollListener类的具体用法?Java PauseOnScrollListener怎么用?Java PauseOnScrollListener使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PauseOnScrollListener类属于com.nostra13.universalimageloader.core.listener包,在下文中一共展示了PauseOnScrollListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: init

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
private void init() {
    this.mStatusCache = FileCache.get(this.ctx, getClass().getName());
    this.mMealType = getIntent().getStringExtra("meal_type");
    setActionBarTitle();
    this.mBean = getCacheData();
    this.mDatas = this.mBean != null ? this.mBean.getMeals() : new ArrayList();
    this.loadingFooter = new TurboLoadingFooter(this);
    this.mAdapter = new SelectStatusAdapter(this.ctx, this.mDatas);
    this.mListView = (PullToRefreshListView) this.finder.find(R.id.listView);
    ((ListView) this.mListView.getRefreshableView()).addFooterView(this.loadingFooter.getView
            ());
    this.mListView.setOnScrollListener(new PauseOnScrollListener(this.imageLoader, true, true));
    this.mListView.setOnRefreshListener(new RefreshL());
    this.mListView.setOnLastItemVisibleListener(new LoadMoreL());
    this.mListView.setOnItemClickListener(this);
    this.mListView.setAdapter(this.mAdapter);
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:18,代码来源:SelectStatusActivity.java

示例2: initRes

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
/**
 * @Description 初始化界面资源
 */
private void initRes() {
    // 设置顶部标题栏
    showContactTopBar();
    hideTopBar();

    super.init(curView);
    showProgressBar();

    sortSideBar = (SortSideBar) curView.findViewById(R.id.sidrbar);
    dialog = (TextView) curView.findViewById(R.id.dialog);
    sortSideBar.setTextView(dialog);
    sortSideBar.setOnTouchingLetterChangedListener(this);

    allContactListView = (ListView) curView.findViewById(R.id.all_contact_list);
    departmentContactListView = (ListView) curView.findViewById(R.id.department_contact_list);

    //this is critical, disable loading when finger sliding, otherwise you'll find sliding is not very smooth
    allContactListView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));
    departmentContactListView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));
    // todo eric
    // showLoadingProgressBar(true);
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:26,代码来源:ContactFragment.java

示例3: findViews

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
private void findViews() {
    // loading
    loadingFrame = findView(R.id.contact_loading_frame);

    // count
    View countLayout = View.inflate(getView().getContext(), R.layout.nim_contacts_count_item, null);
    countLayout.setClickable(false);
    countText = (TextView) countLayout.findViewById(R.id.contactCountText);

    // ListView
    listView = findView(R.id.contact_list_view);
    listView.addFooterView(countLayout); // 注意:addFooter要放在setAdapter之前,否则旧版本手机可能会add不上
    listView.setAdapter(adapter);
    listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));

    ContactItemClickListener listener = new ContactItemClickListener();
    listView.setOnItemClickListener(listener);
    listView.setOnItemLongClickListener(listener);
}
 
开发者ID:LegendKe,项目名称:MyTravelingDiary,代码行数:20,代码来源:ContactsFragment.java

示例4: PhotoWallAdapter

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
/**
 * �ܶ��Ա�����ij�ʼ������
 */
public PhotoWallAdapter(Context context, int textViewResourceId, List<Manhua> manhuas, GridView photoWall) {
	super(context, textViewResourceId, manhuas);
	
	mLayoutInflater = LayoutInflater.from(context);
	mPhotoWall = photoWall;
	
	mImageLoader = ImageLoader.getInstance();
	mOptions = new DisplayImageOptions.Builder()
	.showImageOnLoading(R.drawable.empty_photo)
	.showImageOnFail(R.drawable.empty_photo)
	.cacheInMemory(true)
	.cacheOnDisk(true)
	.bitmapConfig(android.graphics.Bitmap.Config.RGB_565)
	.build();
	
	
	mPhotoWall.setOnScrollListener(new PauseOnScrollListener(mImageLoader, true, true));
}
 
开发者ID:ZhaoYukai,项目名称:ManhuaHouse,代码行数:22,代码来源:PhotoWallAdapter.java

示例5: onCreateView

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View contentView = inflater.inflate(R.layout.fragment_image_grid_layout, null);
    imageGridView = (HeaderGridView) contentView.findViewById(R.id.gridGallery);
    int numColumns = (getResources().getDisplayMetrics().widthPixels - DisplayUtils.dip2px(6, getActivity())) / DisplayUtils.dip2px(116, getActivity());
    imageGridView.setNumColumns(numColumns);
    imageGridView.setVerticalScrollBarEnabled(false);

    View footerView = new View(getActivity());
    LayoutParams lp = new LayoutParams(LayoutParams.WRAP_CONTENT, DisplayUtils.dip2px(82, getActivity()));
    footerView.setLayoutParams(lp);
    imageGridView.addFooterView(footerView, null, false);

    mAdapter = new ImageGridAdapter(getActivity(), options);
    mAdapter.setChoseImageListener(mViewImageListener);
    mAdapter.swapDatas(mImages);
    PauseOnScrollListener listener = new PauseOnScrollListener(ImageLoader.getInstance(), true, true);
    imageGridView.setOnScrollListener(listener);
    imageGridView.setOnItemClickListener(this);
    imageGridView.setAdapter(mAdapter);
    return contentView;
}
 
开发者ID:laomengzhu,项目名称:MutiPhotoChoser,代码行数:23,代码来源:ImageGridFragment.java

示例6: onCreateView

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
    mListView = (ListView) inflater.inflate(R.layout.comments_list, container, false);
    mListView.setAdapter(new CommentsAdapter());
    mListView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));
    mListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
    mListView.setOnItemClickListener(mItemClickListener);
    
    mListView.addHeaderView(createPostView());
    
    if(mComments == null)
    {
        // Inflate loading layout.
        mLoadingView = inflater.inflate(R.layout.loading, mListView, false);
        // Add loadind view to listview bottom.
        mListView.addFooterView(mLoadingView, null, false);
        
        // Send request intent.
        Intent intent = new Intent(Constants.INTENT_FILTER.ACTION_GET_POST_COMMENTS);
        intent.putExtra(Constants.BUNDLE.KEY_POST, mLepraPost);
        LocalBroadcastManager.getInstance(getActivity()).sendBroadcast(intent);
    }
    
    return mListView;
}
 
开发者ID:hexonxons,项目名称:LepraWatch,代码行数:27,代码来源:CommentsFragment.java

示例7: initContactListView

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
private void initContactListView() {
    contactListView = (ListView) curView.findViewById(R.id.ContactListView);
    contactListView.setOnItemClickListener(this);
    contactListView.setOnItemLongClickListener(this);
    contactAdapter = new  ChatAdapter(getActivity());
    contactListView.setAdapter(contactAdapter);

    // this is critical, disable loading when finger sliding, otherwise
    // you'll find sliding is not very smooth
    contactListView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(),
            true, true));
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:13,代码来源:ChatFragment.java

示例8: initAdapter

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
private void initAdapter(){
    logger.d("groupmgr#initAdapter");

    gridView = (GridView) curView.findViewById(R.id.group_manager_grid);
    gridView.setSelector(new ColorDrawable(Color.TRANSPARENT));// 去掉点击时的黄色背影
    gridView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));

    adapter = new GroupManagerAdapter(getActivity(),imService,peerEntity);
    gridView.setAdapter(adapter);
}
 
开发者ID:ccfish86,项目名称:sctalk,代码行数:11,代码来源:GroupManagerFragment.java

示例9: initViews

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
private void initViews() {
    mToolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(mToolbar);

    DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
    ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, mToolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
    drawer.setDrawerListener(toggle);
    toggle.syncState();

    NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
    View headerView= navigationView.inflateHeaderView(R.layout.nav_header_main);
    navigationView.setNavigationItemSelectedListener(this);

    headerView.findViewById(R.id.head_img).setOnClickListener(this);
    headerView.findViewById(R.id.head_web).setOnClickListener(this);
    headerView.findViewById(R.id.head_name).setOnClickListener(this);

    mRefreshLayout = (RefreshLayout) findViewById(R.id.id_swipe_ly);
    mRefreshLayout.setOnRefreshListener(this);
    mRefreshLayout.setOnLoadListener(this);

    mAdapter = new GankCommonAdapter(MainActivity.this,null);
    mListView = (ListView) findViewById(R.id.id_listview);
    mListView.setAdapter(mAdapter);
    mListView.setOnItemClickListener(this);
    mListView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, false));
}
 
开发者ID:GcsSloop,项目名称:Gank,代码行数:28,代码来源:MainActivity.java

示例10: init

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
private void init(String action)
{
	gv_gallery = (GridView) findViewById(R.id.gallery);
	gv_gallery.setFastScrollEnabled(true);
	adapter = new GalleryAdapter(this, imageLoader);
	PauseOnScrollListener listener = new PauseOnScrollListener(imageLoader, true, true);
	gv_gallery.setOnScrollListener(listener);

	if(action.equals(ACTION_PICK_SINGLE))
	{
		findViewById(R.id.container).setVisibility(View.GONE);
		gv_gallery.setOnItemClickListener(mItemSingleClickListener);
		adapter.setSelectMode(false);
		if(picture_max > 1)
		{
			picture_max = 1;
			Log.w(TAG, "ACTION_PICK_SINGLE mismatch with picture number " + picture_max);
		}
	}

	gv_gallery.setAdapter(adapter);
	iv_picture_unavailable = (ImageView) findViewById(R.id.picture_unavailable);
	
	new Runnable()
	{
		@Override
		public void run()
		{
			adapter.add(getGalleryPhotos());
			iv_picture_unavailable.setVisibility(adapter.isEmpty() ? View.VISIBLE:View.GONE);
		}
	}.run();

}
 
开发者ID:KAlO2,项目名称:PerfectShow,代码行数:35,代码来源:GalleryActivity.java

示例11: onCreate

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    DisplayMetrics metrics = new DisplayMetrics();
    getWindowManager().getDefaultDisplay().getMetrics(metrics);
    gridView = (GridView) findViewById(R.id.grid_photo);
    PhotoAdapter adapter = new PhotoAdapter(this);
    gridView.setAdapter(adapter);
    gridView.setOnItemClickListener(photoClickListener);
    gridView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), false, true));
}
 
开发者ID:xulailing,项目名称:android-open-project-demo-master,代码行数:13,代码来源:MainActivity.java

示例12: onCreate

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.zg_activity_media_show);
	mTV_catalog_name = (TextView) findViewById(R.id.tv_catalog_name);
	mTV_catalog_name.setOnClickListener(this);
	mTV_catalog_name.setEnabled(false);

	mTV_preview = (TextView) findViewById(R.id.tv_preview);
	mTV_preview.setOnClickListener(this);

	mTv_right = (TextView) findViewById(R.id.tv_right);
	mTv_right.setOnClickListener(this);

	findViewById(R.id.iv_left).setOnClickListener(this);

	initMode();

	mImageLoader = ImageLoader.getInstance();
	mGridView = (GridView) findViewById(R.id.gridview);
	mGridView.setFastScrollEnabled(true);
	PauseOnScrollListener listener = new PauseOnScrollListener(
			mImageLoader, true, true);
	mGridView.setOnScrollListener(listener);
	mMediaAdapter = new AdapterMediaShow(this, mediaType, mSelectedList);
	mGridView.setAdapter(mMediaAdapter);
	mGridView.setOnItemClickListener(this);

	new Thread(new getMediaInfoTask(null)).start();
}
 
开发者ID:BigAppOS,项目名称:BigApp_WordPress_Android,代码行数:31,代码来源:MediaShowActivity.java

示例13: onActivityCreated

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
@Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        listView = (ListView)getView().findViewById(R.id.listView);
        ivLoading = (ImageView)getView().findViewById(R.id.iv_live_loading);

        lySrf = (SwipeRefreshLayout)getView().findViewById(R.id.id_swipe_ly);
//        lySrf.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
//            @Override
//            public void onRefresh() {
//                if (!isRefresh) {
//                    isRefresh = true;
//                    queryData();
//                    System.out.println("refresh");
//                }
//            }
//        });

        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                LiveBean liveBean = (LiveBean) listView.getItemAtPosition(position);
                if (liveBean != null) {
//                    System.out.println(liveBean.getTvUrl());
                    LiveActivity.activityStart(MyApplication.getNavagationActivity(), liveBean.getTvUrl(), liveBean.getTvName());
                }
            }
        });

        listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));
        setadapter();
        initTempData();
    }
 
开发者ID:wanliyang1990,项目名称:WliveTV,代码行数:34,代码来源:LiveFragment.java

示例14: onActivityCreated

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
@Override
    public void onActivityCreated(@Nullable Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
        listView = (ListView)getView().findViewById(R.id.listView);
        ivLoading = (ImageView)getView().findViewById(R.id.iv_video_loading);

        lySrf = (SwipeRefreshLayout)getView().findViewById(R.id.id_swipe_ly);
//        lySrf.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
//            @Override
//            public void onRefresh() {
//                if(!isRefresh)
//                {
//                    isLoadData = false;
//                    isRefresh = true;
//                    System.out.println("refresh");
//                }
//            }
//        });

        listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                VideoBean videoBean = (VideoBean) listView.getItemAtPosition(position);
                if (videoBean != null) {
//                    System.out.println(liveBean.getTvUrl());
                    LiveActivity.activityStart(MyApplication.getNavagationActivity(), videoBean.getTvUrl(), videoBean.getTvName());
                }
            }
        });
        listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));
        setadapter();
        initTemData();
    }
 
开发者ID:wanliyang1990,项目名称:WliveTV,代码行数:34,代码来源:VideoFragment.java

示例15: initListView

import com.nostra13.universalimageloader.core.listener.PauseOnScrollListener; //导入依赖的package包/类
private void initListView() {
	mAdapter = new ChatMsgAdapter(ctx, mMsgs);
	mAdapter.setDatas(mMsgs);
	xListView.setAdapter(mAdapter);
	xListView.setPullRefreshEnable(true);
	xListView.setPullLoadEnable(false);
	xListView.setXListViewListener(this);
	xListView.setOnScrollListener(
			new PauseOnScrollListener(UserService.imageLoader, true, true));
}
 
开发者ID:lanixzcj,项目名称:LoveTalkClient,代码行数:11,代码来源:ChatActivity.java


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