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


Java VerticalRecyclerViewFastScroller类代码示例

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


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

示例1: onCreateView

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Override
public final View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mAdapter = new ContactAdapter(getContext(), null, mSortOrder, mPictureType, mDescription, mDescriptionType);

    View rootLayout = super.createView(inflater, R.layout.cp_contact_list, mAdapter, mContacts);

    // configure fast scroll
    RecyclerView recyclerView = (RecyclerView) rootLayout.findViewById(android.R.id.list);
    VerticalRecyclerViewFastScroller fastScroller = (VerticalRecyclerViewFastScroller) rootLayout.findViewById(R.id.fast_scroller);
    fastScroller.setRecyclerView(recyclerView);
    recyclerView.addOnScrollListener(fastScroller.getOnScrollListener());

    // configure section indexer
    SectionTitleIndicator sectionTitleIndicator = (SectionTitleIndicator) rootLayout.findViewById(R.id.fast_scroller_section_title_indicator);
    fastScroller.setSectionIndicator(sectionTitleIndicator);

    return rootLayout;
}
 
开发者ID:hwding,项目名称:templated-messaging,代码行数:19,代码来源:ContactFragment.java

示例2: configurePoliticiansView

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
private void configurePoliticiansView() {
    RecyclerView mPoliticiansView = (RecyclerView) findViewById(R.id.politician_grid);
    VerticalRecyclerViewFastScroller fastScroller = (VerticalRecyclerViewFastScroller) findViewById(R.id.fast_scroller);
    PoliticianSectionIndicator sectionIndicator = (PoliticianSectionIndicator) findViewById(R.id.fast_scroller_section_indicator);
    fastScroller.setRecyclerView(mPoliticiansView);
    fastScroller.setSectionIndicator(sectionIndicator);
    mPoliticiansView.addOnScrollListener(fastScroller.getOnScrollListener());

    mPoliticiansCardAdapter = new PoliticianCardAdapter(presenter.getCurrentNotebook());

    //RecyclerView.LayoutManager mLayoutManager = new StaggeredGridLayoutManager(2, OrientationHelper.VERTICAL);
    RecyclerView.LayoutManager mLayoutManager = new GridLayoutManager(this, 2);
    mPoliticiansView.setLayoutManager(mLayoutManager);
    mPoliticiansView.setItemAnimator(new DefaultItemAnimator());
    mPoliticiansView.setAdapter(mPoliticiansCardAdapter);
}
 
开发者ID:TekkLabs,项目名称:memoria-politica,代码行数:17,代码来源:MainActivity.java

示例3: onCreateView

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Override
public final View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mAdapter = new ContactAdapter(getContext(), null, mSortOrder, mPictureType, mDescription, mDescriptionType);

    View rootLayout = super.createView(inflater, R.layout.cp_contact_list, mAdapter, mContacts);

    // configure fast scroll
    RecyclerView recyclerView = (RecyclerView) rootLayout.findViewById(android.R.id.list);
    VerticalRecyclerViewFastScroller fastScroller = (VerticalRecyclerViewFastScroller) rootLayout.findViewById(R.id.fast_scroller);
    fastScroller.setRecyclerView(recyclerView);
    recyclerView.addOnScrollListener(fastScroller.getOnScrollListener());

    // configure section indexer
    SectionTitleIndicator sectionTitleIndicator = (SectionTitleIndicator ) rootLayout.findViewById(R.id.fast_scroller_section_title_indicator);
    fastScroller.setSectionIndicator(sectionTitleIndicator);

    return rootLayout;
}
 
开发者ID:1gravity,项目名称:Android-ContactPicker,代码行数:19,代码来源:ContactFragment.java

示例4: onCreateView

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_index_list, container, false);

    Context context = v.getContext();

    mProgressBar = (MaterialProgressBar) v.findViewById(R.id.index_progress_bar);
    mRecyclerView = (RecyclerView) v.findViewById(R.id.index_recycler_view);
    mFastScroller = (VerticalRecyclerViewFastScroller) v.findViewById(R.id.index_fast_scroller);

    mRecyclerView.setLayoutManager(new LinearLayoutManager(context));

    mFastScroller.setRecyclerView(mRecyclerView);
    mRecyclerView.setOnScrollListener(mFastScroller.getOnScrollListener());

    mVaultIndexItems = EROWID_DB.getReportIndex();

    mGetReportIndexTask = new GetReportIndexTask();
    mGetReportIndexTask.execute();

    return v;
}
 
开发者ID:melancholiclabs,项目名称:ElegantErowid,代码行数:24,代码来源:VaultIndexFragment.java

示例5: onCreateView

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_index_list, container, false);

    Context context = v.getContext();

    mProgressBar = (MaterialProgressBar) v.findViewById(R.id.index_progress_bar);
    mRecyclerView = (RecyclerView) v.findViewById(R.id.index_recycler_view);
    mFastScroller = (VerticalRecyclerViewFastScroller) v.findViewById(R.id.index_fast_scroller);

    mRecyclerView.setLayoutManager(new LinearLayoutManager(context));

    mFastScroller.setRecyclerView(mRecyclerView);
    mRecyclerView.setOnScrollListener(mFastScroller.getOnScrollListener());

    return v;
}
 
开发者ID:melancholiclabs,项目名称:ElegantErowid,代码行数:19,代码来源:SearchFragment.java

示例6: onCreateView

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    setupVariables();
    View v = inflater.inflate(R.layout.recycler_layout, container, false);
    rv = (RecyclerView) v.findViewById(R.id.rv);
    rv.setLayoutManager(new LinearLayoutManager(getActivity()));
    rv.setHasFixedSize(true);
    rv.setVerticalScrollBarEnabled(false);
    scroller = (VerticalRecyclerViewFastScroller) v.findViewById(R.id.fast_scroller);
    if (!prefHelper.overviewFav())
        scroller.setVisibility(View.VISIBLE);
    scroller.setRecyclerView(rv);
    rv.addOnScrollListener(scroller.getOnScrollListener());

    if (savedInstanceState == null) {
        databaseManager.new updateComicDatabase(null, this, prefHelper).execute();
    } else {
        super.setupAdapter();
        rvAdapter = new CardsAdapter();
        rv.setAdapter(rvAdapter);
    }

    return v;
}
 
开发者ID:T-Rex96,项目名称:Easy_xkcd,代码行数:25,代码来源:OverviewCardsFragment.java

示例7: onCreate

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    this.context = this;
    this.appPreferences = MoticonsApplication.getAppPreferences();

    initUI();
    isFirstRun();

    recyclerView = (RecyclerView) findViewById(R.id.moticonList);
    fastScroller = (VerticalRecyclerViewFastScroller) findViewById(R.id.fast_scroller);
    progressWheel = (ProgressWheel) findViewById(R.id.progress);
    noResults = (LinearLayout) findViewById(R.id.noResults);

    recyclerView.setHasFixedSize(true);
    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(context);
    linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    recyclerView.setLayoutManager(linearLayoutManager);

    fastScroller.setRecyclerView(recyclerView);
    recyclerView.setOnScrollListener(fastScroller.getOnScrollListener());
    progressWheel.setVisibility(View.VISIBLE);

    new getMoticons().execute();
}
 
开发者ID:javiersantos,项目名称:Moticons,代码行数:27,代码来源:MainActivity.java

示例8: onCreate

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    this.appPreferences = MLManagerApplication.getAppPreferences();
    this.activity = this;
    this.context = this;

    setInitialConfiguration();
    checkAndAddPermissions(activity);
    setAppDir();

    recyclerView = (RecyclerView) findViewById(R.id.appList);
    pullToRefreshView = (PullToRefreshView) findViewById(R.id.pull_to_refresh);
    fastScroller = (VerticalRecyclerViewFastScroller) findViewById(R.id.fast_scroller);
    progressWheel = (ProgressWheel) findViewById(R.id.progress);
    noResults = (LinearLayout) findViewById(R.id.noResults);

    pullToRefreshView.setEnabled(false);

    recyclerView.setHasFixedSize(true);
    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
    linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    recyclerView.setLayoutManager(linearLayoutManager);

    drawer = UtilsUI.setNavigationDrawer((Activity) context, context, toolbar, appAdapter, appSystemAdapter, appFavoriteAdapter, appHiddenAdapter, recyclerView);

    progressWheel.setBarColor(appPreferences.getPrimaryColorPref());
    progressWheel.setVisibility(View.VISIBLE);
    new getInstalledApps().execute();

}
 
开发者ID:javiersantos,项目名称:MLManager,代码行数:33,代码来源:MainActivity.java

示例9: onCreate

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_images_selector);

    // hide actionbar
    ActionBar actionBar = getSupportActionBar();
    if(actionBar != null) {
        actionBar.hide();
    }

    // get parameters from bundle
    Intent intent = getIntent();
    SelectorSettings.mMaxImageNumber = intent.getIntExtra(SelectorSettings.SELECTOR_MAX_IMAGE_NUMBER, SelectorSettings.mMaxImageNumber);
    SelectorSettings.isShowCamera = intent.getBooleanExtra(SelectorSettings.SELECTOR_SHOW_CAMERA, SelectorSettings.isShowCamera);
    SelectorSettings.mMinImageSize = intent.getIntExtra(SelectorSettings.SELECTOR_MIN_IMAGE_SIZE, SelectorSettings.mMinImageSize);

    ArrayList<String> selected = intent.getStringArrayListExtra(SelectorSettings.SELECTOR_INITIAL_SELECTED_LIST);
    ImageListContent.SELECTED_IMAGES.clear();
    if(selected != null && selected.size() > 0) {
        ImageListContent.SELECTED_IMAGES.addAll(selected);
    }

    // initialize widgets in custom actionbar
    mButtonBack = (ImageView) findViewById(R.id.selector_button_back);
    mButtonBack.setOnClickListener(this);

    mButtonConfirm = (Button) findViewById(R.id.selector_button_confirm);
    mButtonConfirm.setOnClickListener(this);

    // initialize recyclerview
    View rview = findViewById(R.id.image_recycerview);
    // Set the adapter
    if (rview instanceof RecyclerView) {
        Context context = rview.getContext();
        recyclerView = (RecyclerView) rview;
        if (mColumnCount <= 1) {
            recyclerView.setLayoutManager(new LinearLayoutManager(context));
        } else {
            recyclerView.setLayoutManager(new GridLayoutManager(context, mColumnCount));
        }
        recyclerView.setAdapter(new ImageRecyclerViewAdapter(ImageListContent.IMAGES, this));

        VerticalRecyclerViewFastScroller fastScroller = (VerticalRecyclerViewFastScroller) findViewById(R.id.recyclerview_fast_scroller);
        // Connect the recycler to the scroller (to let the scroller scroll the list)
        fastScroller.setRecyclerView(recyclerView);
        // Connect the scroller to the recycler (to let the recycler scroll the scroller's handle)
        recyclerView.addOnScrollListener(fastScroller.getOnScrollListener());
    }

    // popup windows will be anchored to this view
    mPopupAnchorView = findViewById(R.id.selector_footer);

    // initialize buttons in footer
    mFolderSelectButton = (TextView) findViewById(R.id.selector_image_folder_button);
    mFolderSelectButton.setText(R.string.selector_folder_all);
    mFolderSelectButton.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(final View view) {

            if (mFolderPopupWindow == null) {
                mFolderPopupWindow = new FolderPopupWindow();
                mFolderPopupWindow.initPopupWindow(ImagesSelectorActivity.this);
            }

            if (mFolderPopupWindow.isShowing()) {
                mFolderPopupWindow.dismiss();
            } else {
                mFolderPopupWindow.showAtLocation(mPopupAnchorView, Gravity.BOTTOM, 10, 150);
            }
        }
    });

    currentFolderPath = "";
    FolderListContent.clear();
    ImageListContent.clear();

    updateDoneButton();

    requestReadStorageRuntimePermission();
}
 
开发者ID:zfdang,项目名称:android-multiple-images-selector,代码行数:82,代码来源:ImagesSelectorActivity.java

示例10: onCreateView

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_ayah_word, container, false);

    mRecyclerView = (RecyclerView) view.findViewById(R.id.recycler_ayah_word_view);

    //for fast scroll
    VerticalRecyclerViewFastScroller fastScroller = (VerticalRecyclerViewFastScroller) view.findViewById(R.id.fast_scroller);

    // Connect the recycler to the scroller (to let the scroller scroll the list)
    fastScroller.setRecyclerView(mRecyclerView);

    // Connect the scroller to the recycler (to let the recycler scroll the scroller's handle)
    mRecyclerView.setOnScrollListener(fastScroller.getOnScrollListener());

    ayahWordAdapter = new AyahWordAdapter(ayahWordArrayList, getActivity(), surah_id);


    return view;
}
 
开发者ID:SadaqaWorks,项目名称:Word-By-Word-Quran-Android,代码行数:22,代码来源:AyahWordFragment.java

示例11: onCreateView

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_index_list, container, false);

    Context context = v.getContext();

    mProgressBar = (MaterialProgressBar) v.findViewById(R.id.index_progress_bar);
    mRecyclerView = (RecyclerView) v.findViewById(R.id.index_recycler_view);
    mFastScroller = (VerticalRecyclerViewFastScroller) v.findViewById(R.id.index_fast_scroller);

    mRecyclerView.setLayoutManager(new LinearLayoutManager(context));

    mFastScroller.setRecyclerView(mRecyclerView);
    mRecyclerView.setOnScrollListener(mFastScroller.getOnScrollListener());

    if (mIndexType.equals(ErowidDB.Index.CHEMICALS.getIndexName())) {
        mIndexItems = EROWID_DB.getChemIndex();
        if (EROWID_DB.isChemIndexLoaded()) {
            hideProgressBar();
            mRecyclerView.setAdapter(new IndexRecyclerViewAdapter(mIndexItems, mListener));
        } else {
            mLoadIndexTask.execute();
        }
    } else if (mIndexType.equals(ErowidDB.Index.PLANTS.getIndexName())) {
        mIndexItems = EROWID_DB.getPlantIndex();
        if (EROWID_DB.isPlantIndexLoaded()) {
            hideProgressBar();
            mRecyclerView.setAdapter(new IndexRecyclerViewAdapter(mIndexItems, mListener));
        } else {
            mLoadIndexTask.execute();
        }
    } else if (mIndexType.equals(ErowidDB.Index.HERBS.getIndexName())) {
        mIndexItems = EROWID_DB.getHerbIndex();
        if (EROWID_DB.isHerbIndexLoaded()) {
            hideProgressBar();
            mRecyclerView.setAdapter(new IndexRecyclerViewAdapter(mIndexItems, mListener));
        } else {
            mLoadIndexTask.execute();
        }
    } else if (mIndexType.equals(ErowidDB.Index.PHARMS.getIndexName())) {
        mIndexItems = EROWID_DB.getPharmIndex();
        if (EROWID_DB.isPharmIndexLoaded()) {
            hideProgressBar();
            mRecyclerView.setAdapter(new IndexRecyclerViewAdapter(mIndexItems, mListener));
        } else {
            mLoadIndexTask.execute();
        }
    } else if (mIndexType.equals(ErowidDB.Index.SMARTS.getIndexName())) {
        mIndexItems = EROWID_DB.getSmartIndex();
        if (EROWID_DB.isSmartIndexLoaded()) {
            hideProgressBar();
            mRecyclerView.setAdapter(new IndexRecyclerViewAdapter(mIndexItems, mListener));
        } else {
            mLoadIndexTask.execute();
        }
    } else if (mIndexType.equals(ErowidDB.Index.ANIMALS.getIndexName())) {
        mIndexItems = EROWID_DB.getAnimalIndex();
        if (EROWID_DB.isAnimalIndexLoaded()) {
            hideProgressBar();
            mRecyclerView.setAdapter(new IndexRecyclerViewAdapter(mIndexItems, mListener));
        } else {
            mLoadIndexTask.execute();
        }
    } else if (mIndexType.equals(ErowidDB.Index.VAULT.getIndexName())) {
        mIndexItems = EROWID_DB.getVaultIndex();
        if (EROWID_DB.isVaultIndexLoaded()) {
            hideProgressBar();
            mRecyclerView.setAdapter(new IndexRecyclerViewAdapter(mIndexItems, mListener));
        } else {
            mLoadIndexTask.execute();
        }
    } else {
        Log.d(TAG, "IndexType could not be determined.");
    }

    return v;
}
 
开发者ID:melancholiclabs,项目名称:ElegantErowid,代码行数:79,代码来源:IndexFragment.java

示例12: setRecyclerViewLayoutManager

import xyz.danoz.recyclerviewfastscroller.vertical.VerticalRecyclerViewFastScroller; //导入依赖的package包/类
/**
 * Set RecyclerView's LayoutManager
 */
public void setRecyclerViewLayoutManager(RecyclerView recyclerView, RecyclerView.Adapter adapter) {

    // ---------- init recycler

    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
    recyclerView.setLayoutManager(linearLayoutManager);
    recyclerView.setAdapter(adapter);

    int scrollPosition = linearLayoutManager.findFirstCompletelyVisibleItemPosition();
    recyclerView.scrollToPosition(scrollPosition);

    // ---------- set index on the right

    VerticalRecyclerViewFastScroller fastScroller = (VerticalRecyclerViewFastScroller) findViewById(R.id
            .fast_scroller);

    // Connect the recycler to the scroller (to let the scroller scroll the list)
    fastScroller.setRecyclerView(recyclerView);

    // Connect the scroller to the recycler (to let the recycler scroll the scroller's handle)
    recyclerView.addOnScrollListener(fastScroller.getOnScrollListener());

    // Connect the section indicator to the scroller
    SectionIndicator sectionTitleIndicator = (SectionIndicator) findViewById(R.id
            .fast_scroller_section_title_indicator);

    fastScroller.setSectionIndicator(sectionTitleIndicator);

}
 
开发者ID:derlin,项目名称:mybooks-android,代码行数:33,代码来源:MainActivity.java


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