Java 类com.nostra13.universalimageloader.core.listener.PauseOnScrollListener 实例源码

项目:boohee_v5.6    文件:SelectStatusActivity.java   
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);
}
项目:sctalk    文件:ContactFragment.java   
/**
 * @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);
}
项目:MyTravelingDiary    文件:ContactsFragment.java   
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);
}
项目:ManhuaHouse    文件:PhotoWallAdapter.java   
/**
 * �ܶ��Ա�����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));
}
项目:MutiPhotoChoser    文件:ImageGridFragment.java   
@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;
}
项目:LepraWatch    文件:CommentsFragment.java   
@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;
}
项目:sctalk    文件:ChatFragment.java   
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));
}
项目:sctalk    文件:GroupManagerFragment.java   
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);
}
项目:Gank    文件:MainActivity.java   
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));
}
项目:PerfectShow    文件:GalleryActivity.java   
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();

}
项目:android-open-project-demo-master    文件:MainActivity.java   
@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));
}
项目:BigApp_WordPress_Android    文件:MediaShowActivity.java   
@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();
}
项目:WliveTV    文件:LiveFragment.java   
@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();
    }
项目:WliveTV    文件:VideoFragment.java   
@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();
    }
项目:LoveTalkClient    文件:ChatActivity.java   
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));
}
项目:4pdaClient-plus    文件:NewsListFragment.java   
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    getListView().setDivider(null);
    getListView().setDividerHeight(0);
    getListView().setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), false, true));
}
项目:Nepenthes-Android    文件:ImagePickActivity.java   
private void init() {
    ImageLoader imageLoader = ImageLoader.getInstance();
    handler = new Handler();
    gridGallery = (GridView) findViewById(R.id.gridGallery);
    gridGallery.setFastScrollEnabled(true);
    adapter = new GalleryAdapter(imageLoader);
    PauseOnScrollListener listener = new PauseOnScrollListener(imageLoader, true, true);
    gridGallery.setOnScrollListener(listener);
    gridGallery.setOnItemClickListener(this);
    gridGallery.setOnItemLongClickListener(this);
    gridGallery.setAdapter(adapter);
    imgNoMedia = (ImageView) findViewById(R.id.imgNoMedia);
    new Thread() {

        @Override
        public void run() {
            Looper.prepare();
            handler.post(new Runnable() {

                @Override
                public void run() {
                    adapter.addData(ImageUtil.getGalleryPhotos(ImagePickActivity.this));
                    checkImageStatus();
                }
            });
            Looper.loop();
        }
    }.start();
}
项目:android-open-project-demo    文件:MainActivity.java   
@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));
}
项目:SinaWeibo_Android    文件:FragmentComment.java   
private void findViews() {
    mCommentListView = (UpDownRefershListView) mRootView
            .findViewById(R.id.lv_home);
    refreshListener = new MyRefreshListener();
    mCommentListView.setRefreshListener(refreshListener);
    mCommentListView.setOnScrollListener(new PauseOnScrollListener(
            ImageLoader.getInstance(), pauseOnScroll, pauseOnFling));
}
项目:SinaWeibo_Android    文件:FragmentHome.java   
private void findViews() {
    mListView = (UpDownRefershListView) mRootView
            .findViewById(R.id.lv_home);
    refreshListener = new MyRefreshListener();
    mListView.setRefreshListener(refreshListener);
    mListView.setOnScrollListener(new PauseOnScrollListener(ImageLoader
            .getInstance(), pauseOnScroll, pauseOnFling));
    initListDataFrmFile("response.json");
}
项目:GitHub    文件:AbsListViewBaseFragment.java   
private void applyScrollListener() {
    listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), pauseOnScroll, pauseOnFling));
}
项目:GifImageLoader    文件:AbsListViewBaseFragment.java   
private void applyScrollListener() {
    listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), pauseOnScroll, pauseOnFling));
}
项目:ImageLoaderSupportGif    文件:AbsListViewBaseFragment.java   
private void applyScrollListener() {
    listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), pauseOnScroll, pauseOnFling));
}
项目:https-github.com-nostra13-Android-Universal-Image-Loader    文件:AbsListViewBaseFragment.java   
private void applyScrollListener() {
    listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), pauseOnScroll, pauseOnFling));
}
项目:andoridDome    文件:AbsListViewBaseFragment.java   
private void applyScrollListener() {
    listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), pauseOnScroll, pauseOnFling));
}
项目:Android-Universal-Image-Loader-Modify    文件:AbsListViewBaseFragment.java   
private void applyScrollListener() {
    listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), pauseOnScroll, pauseOnFling));
}
项目:4pdaClient-plus    文件:QmsContactsList.java   
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    getListView().setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), false, true));
    registerForContextMenu(getListView());
}
项目:4pdaClient-plus    文件:DevDbModelsFragment.java   
@Override
public void onActivityCreated(Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    getListView().setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), false, true));
}
项目:CodePix-Android    文件:AbsListViewBaseActivity.java   
private void applyScrollListener() {
    listView.setOnScrollListener(new PauseOnScrollListener(imageLoader, pauseOnScroll, pauseOnFling));
}
项目:LepraWatch    文件:MainFragment.java   
@Override
public void onReceive(Context context, Intent intent)
{
    switch(intent.getAction())
    {
        case Constants.INTENT_FILTER.ACTION_LOGOUT_FAIL:
        {
            break;
        }

        case Constants.INTENT_FILTER.ACTION_LOGOUT_SUCCESS:
        {
            // Workaround with View.setFitsSystemWindows issue.
            // It seems not possible to request fit system windows without activity restart.
            getActivity().finish();
            getActivity().startActivity(getActivity().getIntent());

            break;
        }

        case Constants.INTENT_FILTER.ACTION_GET_POSTS_RESULT_FAIL:
        {
            break;
        }

        case Constants.INTENT_FILTER.ACTION_GET_POSTS_RESULT_SUCCESS:
        {
            mPosts = intent.getParcelableArrayListExtra(Constants.BUNDLE.KEY_POSTS);

            Calendar calendar = new GregorianCalendar();
            calendar.set(Calendar.HOUR_OF_DAY, 0);
            calendar.set(Calendar.MINUTE, 0);
            calendar.set(Calendar.SECOND, 0);
            calendar.set(Calendar.MILLISECOND, 0);

            mTodayBegin = calendar.getTime().getTime();
            calendar.add(Calendar.DAY_OF_MONTH, -1);
            mYesterdayBegin = calendar.getTime().getTime();

            // Remove loading view.
            ViewGroup wrapper = (ViewGroup) getView().findViewById(R.id.posts_wrapper);
            wrapper.removeAllViews();

            // Inflate posts layout.
            getActivity().getLayoutInflater().inflate(R.layout.posts_list, wrapper, true);

            ListView listView = (ListView) wrapper.findViewById(R.id.posts_list);
            listView.setAdapter(new PostsAdapter());
            listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));
            listView.setOnItemClickListener(mPostItemClickListener);

            // Invalidate ab menu after posts is loaded.
            getActivity().supportInvalidateOptionsMenu();

            break;
        }
    }
}
项目:danmaku-project    文件:AbsListViewBaseFragment.java   
private void applyScrollListener() {
    listView.setOnScrollListener(new PauseOnScrollListener(ImageLoader.getInstance(), pauseOnScroll, pauseOnFling));
}
项目:android-wallpaper    文件:AbsListViewBaseActivity.java   
private void applyScrollListener() {
    if (listView != null) {
        listView.setOnScrollListener(new PauseOnScrollListener(imageLoader, pauseOnScroll,
                pauseOnFling));
    }
}
项目:android_xcore    文件:ImageLoaderPlugin.java   
@Override
public void onCreateView(final Fragment fragment, View view, LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    if (fragment instanceof XListFragment) {
        ((XListFragment) fragment).setOnScrollListViewListener(new PauseOnScrollListener(ImageLoader.getInstance(), true, true));
    }
}