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


Java ScaleInAnimationAdapter类代码示例

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


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

示例1: initRecyclerView

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
void initRecyclerView() {
    RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
    mAdapter = new VideoViewAdapter(this, R.layout.adapter_video_item, new ArrayList<Data>());
    ((VideoViewAdapter) mAdapter).setTitle(mToolbar.getTitle().toString());
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    ScaleInAnimationAdapter animationAdapter = new ScaleInAnimationAdapter(mAdapter);
    animationAdapter.setFirstOnly(false);
    recyclerView.setAdapter(animationAdapter);
    recyclerView.setRecyclerListener(new RecyclerView.RecyclerListener() {
        @Override
        public void onViewRecycled(RecyclerView.ViewHolder holder) {
            if (((VideoViewAdapter.ViewHolder) holder).player != null) {
                ((VideoViewAdapter.ViewHolder) holder).player.resetPlayerData();
                ((VideoViewAdapter.ViewHolder) holder).player.release();
            }
        }
    });
}
 
开发者ID:wuyr,项目名称:LuZhiShen,代码行数:20,代码来源:VideoViewActivity.java

示例2: retrieve

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
/**
 * Get data from DB
 */
private void retrieve() {
    DBAdapterHistory db = new DBAdapterHistory(this);
    db.openDB();

    historyDatas.clear();

    Cursor c = db.getAllData();
    while (c.moveToNext()) {
        int id = c.getInt(0);
        String title = c.getString(1);
        String link = c.getString(2);

        HistoryData historyData = new HistoryData(id, title, link);

        historyDatas.add(historyData);
    }

    if (!(historyDatas.size() < 1)) {
        ScaleInAnimationAdapter alphaAdapter = new ScaleInAnimationAdapter(adapter);
        rv.setAdapter(alphaAdapter);
        Collections.reverse(historyDatas);
    }

    db.closeDB();
}
 
开发者ID:RiccardoBusetti,项目名称:Colombo,代码行数:29,代码来源:HistoryActivity.java

示例3: setUpRecyclerView

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
private void setUpRecyclerView(){
    staggeredGridLayoutManager = new StaggeredGridLayoutManager(1,
            StaggeredGridLayoutManager.VERTICAL);
    recyclerView.setLayoutManager(staggeredGridLayoutManager);
    recyclerView.setHasFixedSize(true);

    SpacesItemDecoration decoration = new SpacesItemDecoration(16);
    recyclerView.addItemDecoration(decoration);

    animeAdapter = new AnimeAdapter(this, animes);

    AlphaInAnimationAdapter alphaAdapter = new AlphaInAnimationAdapter(animeAdapter);
    ScaleInAnimationAdapter scaleAdapter = new ScaleInAnimationAdapter(alphaAdapter);
    scaleAdapter.setFirstOnly(false);
    scaleAdapter.setInterpolator(new OvershootInterpolator(2f));

    recyclerView.setAdapter(scaleAdapter);
}
 
开发者ID:Androideity,项目名称:AndroidStudioTutorials,代码行数:19,代码来源:MainActivity.java

示例4: initRecyclerAdapter

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
public void initRecyclerAdapter() {
    mRecyclerAdapter = new DemandQueueRecyclerAdapter(getContext());
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    ScaleInAnimationAdapter scaleInAnimationAdapter = new ScaleInAnimationAdapter(mRecyclerAdapter);
    scaleInAnimationAdapter.setFirstOnly(true);
    mRecyclerAdapter.getOnBookClick()
            .subscribe(new Action1<DemandQueueRecyclerAdapter.DemandQueueRecyclerHolder>() {
                @Override
                public void call(DemandQueueRecyclerAdapter.DemandQueueRecyclerHolder demandQueueRecyclerHolder) {
                    startBookActivity(demandQueueRecyclerHolder);
                }
            });
    mRecyclerAdapter.getOnTransferClick()
            .subscribe(new Action1<Integer>() {
                @Override
                public void call(Integer position) {
                    mDemandQueuePresenter.onTransferBook(position);
                }
            });
    mRecyclerView.addOnScrollListener(onScrollListener);
    mRecyclerView.setAdapter(scaleInAnimationAdapter);
}
 
开发者ID:hypeapps,项目名称:wykopolka-android,代码行数:23,代码来源:DemandQueueFragment.java

示例5: initRecyclerAdapter

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
public void initRecyclerAdapter() {
    mRecyclerAdapter = new WishListRecyclerAdapter(getContext());
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    ScaleInAnimationAdapter scaleInAnimationAdapter = new ScaleInAnimationAdapter(mRecyclerAdapter);
    scaleInAnimationAdapter.setFirstOnly(true);
    mRecyclerAdapter.getOnBookClick()
            .subscribe(new Action1<WishListRecyclerAdapter.WishListRecyclerHolder>() {
                @Override
                public void call(WishListRecyclerAdapter.WishListRecyclerHolder wishListRecyclerHolder) {
                    startBookActivity(wishListRecyclerHolder);
                }
            });
    mRecyclerAdapter.getOnConfirmClick()
            .subscribe(new Action1<Integer>() {
                @Override
                public void call(Integer position) {
                    mWishListPresenter.onConfirmBook(position);
                }
            });
    mRecyclerView.addOnScrollListener(onScrollListener);
    mRecyclerView.setAdapter(scaleInAnimationAdapter);
}
 
开发者ID:hypeapps,项目名称:wykopolka-android,代码行数:23,代码来源:WishListFragment.java

示例6: onCreateView

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view = inflater.inflate(R.layout.fragment_recommend_details, container, false);
    RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.recycler_view);
    Bundle bundle = getArguments();
    ComicTabList comicTabList = (ComicTabList) bundle.getSerializable("tab_list");
    if (comicTabList != null) {
        RecommendDetailsAdapter adapter = new RecommendDetailsAdapter(getActivity(), comicTabList);
        recyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
        recyclerView.setItemAnimator(new DefaultItemAnimator());
        recyclerView.setAdapter(new ScaleInAnimationAdapter(adapter));
    }
    return view;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:17,代码来源:RecommendDetailsFragment.java

示例7: onSuccess

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
public void onSuccess(List<ComicTabList> comicTabLists) {
    mComicTabLists = comicTabLists;
    if (getActivity() == null) return;
    getActivity().runOnUiThread(new Runnable() {
        @Override
        public void run() {
            mAdapter = new RecommendAdapter(getActivity(), mComicTabLists);
            mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
            mRecyclerView.setItemAnimator(new DefaultItemAnimator());
            mRecyclerView.setAdapter(new ScaleInAnimationAdapter(mAdapter));
            mRecyclerView.setVisibility(View.VISIBLE);
            mRefreshLayout.setRefreshing(false);
        }
    });
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:17,代码来源:RecommendFragment.java

示例8: initViews

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
protected void initViews() {
    initToolBar(mToolbar, true, "");
    ScaleInAnimationAdapter animAdapter = new ScaleInAnimationAdapter(mSpecialAdapter);
    RecyclerViewHelper.initRecyclerViewV(this, mRvNewsList, true, new AlphaInAnimationAdapter(animAdapter));
    mLayoutManager = (LinearLayoutManager) mRvNewsList.getLayoutManager();
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:8,代码来源:SpecialActivity.java

示例9: onViewCreated

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    if (savedInstanceState != null) {
        mHeaderDisplay = savedInstanceState
                .getInt(KEY_HEADER_POSITIONING,
                        getResources().getInteger(R.integer.default_header_display));
        mAreMarginsFixed = savedInstanceState
                .getBoolean(KEY_MARGINS_FIXED,
                        getResources().getBoolean(R.bool.default_margins_fixed));
    } else {
        mHeaderDisplay = getResources().getInteger(R.integer.default_header_display);
        mAreMarginsFixed = getResources().getBoolean(R.bool.default_margins_fixed);
    }

    db = FlashcardDb.getInstance(getActivity().getApplicationContext());
    flashcards = db.getAllFlashcards();
    Log.d(TAG, "onViewCreated: flashcards.size() = " + flashcards.size());
    rv.setLayoutManager(new LayoutManager(getActivity()));
    //OverScrollDecoratorHelper.setUpOverScroll(rv, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
    adapter = new RVMainAdapter(getActivity(), mHeaderDisplay, Utils.getFlashcardsByLabel(flashcards, getString(R.string.menu_important)));
    adapter.setMarginsFixed(mAreMarginsFixed);
    adapter.setHeaderDisplay(mHeaderDisplay);
    rv.setAdapter(new ScaleInAnimationAdapter(new AlphaInAnimationAdapter(adapter)));

    LinearLayout noSets = (LinearLayout)view.findViewById(R.id.no_sets);
    if (Utils.getFlashcardsByLabel(flashcards, getString(R.string.menu_important)).isEmpty())
        noSets.setVisibility(View.VISIBLE);
    else
        noSets.setVisibility(View.GONE);
}
 
开发者ID:AbduazizKayumov,项目名称:Flashcard-Maker-Android,代码行数:33,代码来源:ImportantFragment.java

示例10: onViewCreated

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    if (savedInstanceState != null) {
        mHeaderDisplay = savedInstanceState
                .getInt(KEY_HEADER_POSITIONING,
                        getResources().getInteger(R.integer.default_header_display));
        mAreMarginsFixed = savedInstanceState
                .getBoolean(KEY_MARGINS_FIXED,
                        getResources().getBoolean(R.bool.default_margins_fixed));
    } else {
        mHeaderDisplay = getResources().getInteger(R.integer.default_header_display);
        mAreMarginsFixed = getResources().getBoolean(R.bool.default_margins_fixed);
    }

    db = FlashcardDb.getInstance(getActivity().getApplicationContext());
    flashcards = db.getAllFlashcards();
    Log.d(TAG, "onViewCreated: flashcards.size() = " + flashcards.size());
    rv.setLayoutManager(new LayoutManager(getActivity()));
    //OverScrollDecoratorHelper.setUpOverScroll(rv, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
    adapter = new RVMainAdapter(getActivity(), mHeaderDisplay, Utils.getFlashcardsByLabel(flashcards, getString(R.string.menu_todo)));
    adapter.setMarginsFixed(mAreMarginsFixed);
    adapter.setHeaderDisplay(mHeaderDisplay);
    rv.setAdapter(new ScaleInAnimationAdapter(new AlphaInAnimationAdapter(adapter)));

    LinearLayout noSets = (LinearLayout)view.findViewById(R.id.no_sets);
    if (Utils.getFlashcardsByLabel(flashcards, getString(R.string.menu_todo)).isEmpty())
        noSets.setVisibility(View.VISIBLE);
    else
        noSets.setVisibility(View.GONE);
}
 
开发者ID:AbduazizKayumov,项目名称:Flashcard-Maker-Android,代码行数:33,代码来源:TodoFragment.java

示例11: onViewCreated

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    if (savedInstanceState != null) {
        mHeaderDisplay = savedInstanceState
                .getInt(KEY_HEADER_POSITIONING,
                        getResources().getInteger(R.integer.default_header_display));
        mAreMarginsFixed = savedInstanceState
                .getBoolean(KEY_MARGINS_FIXED,
                        getResources().getBoolean(R.bool.default_margins_fixed));
    } else {
        mHeaderDisplay = getResources().getInteger(R.integer.default_header_display);
        mAreMarginsFixed = getResources().getBoolean(R.bool.default_margins_fixed);
    }

    db = FlashcardDb.getInstance(getActivity().getApplicationContext());
    flashcards = db.getAllFlashcards();
    Log.d(TAG, "onViewCreated: flashcards.size() = " + flashcards.size());
    rv.setLayoutManager(new LayoutManager(getActivity()));
    //OverScrollDecoratorHelper.setUpOverScroll(rv, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
    adapter = new RVMainAdapter(getActivity(), mHeaderDisplay,
            Utils.getMostUsedFlashcards(flashcards)
    );
    adapter.setMarginsFixed(mAreMarginsFixed);
    adapter.setHeaderDisplay(mHeaderDisplay);
    rv.setAdapter(new ScaleInAnimationAdapter(new AlphaInAnimationAdapter(adapter)));

    LinearLayout noSets = (LinearLayout)view.findViewById(R.id.no_sets);
    if (Utils.getMostUsedFlashcards(flashcards).isEmpty())
        noSets.setVisibility(View.VISIBLE);
    else
        noSets.setVisibility(View.GONE);
}
 
开发者ID:AbduazizKayumov,项目名称:Flashcard-Maker-Android,代码行数:35,代码来源:MostUsedFragment.java

示例12: onViewCreated

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    if (savedInstanceState != null) {
        mHeaderDisplay = savedInstanceState
                .getInt(KEY_HEADER_POSITIONING,
                        getResources().getInteger(R.integer.default_header_display));
        mAreMarginsFixed = savedInstanceState
                .getBoolean(KEY_MARGINS_FIXED,
                        getResources().getBoolean(R.bool.default_margins_fixed));
    } else {
        mHeaderDisplay = getResources().getInteger(R.integer.default_header_display);
        mAreMarginsFixed = getResources().getBoolean(R.bool.default_margins_fixed);
    }

    db = FlashcardDb.getInstance(getActivity().getApplicationContext());
    flashcards = db.getAllFlashcards();
    Log.d(TAG, "onViewCreated: flashcards.size() = " + flashcards.size());
    rv.setLayoutManager(new LayoutManager(getActivity()));
    //OverScrollDecoratorHelper.setUpOverScroll(rv, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
    adapter = new RVMainAdapter(getActivity(), mHeaderDisplay, Utils.getFlashcardsByLabel(flashcards, getString(R.string.menu_dictionary)));
    adapter.setMarginsFixed(mAreMarginsFixed);
    adapter.setHeaderDisplay(mHeaderDisplay);
    rv.setAdapter(new ScaleInAnimationAdapter(new AlphaInAnimationAdapter(adapter)));

    LinearLayout noSets = (LinearLayout)view.findViewById(R.id.no_sets);
    if (Utils.getFlashcardsByLabel(flashcards, getString(R.string.menu_dictionary)).isEmpty())
        noSets.setVisibility(View.VISIBLE);
    else
        noSets.setVisibility(View.GONE);
}
 
开发者ID:AbduazizKayumov,项目名称:Flashcard-Maker-Android,代码行数:33,代码来源:DictionaryFragment.java

示例13: onViewCreated

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    if (savedInstanceState != null) {
        mHeaderDisplay = savedInstanceState
                .getInt(KEY_HEADER_POSITIONING,
                        getResources().getInteger(R.integer.default_header_display));
        mAreMarginsFixed = savedInstanceState
                .getBoolean(KEY_MARGINS_FIXED,
                        getResources().getBoolean(R.bool.default_margins_fixed));
    } else {
        mHeaderDisplay = getResources().getInteger(R.integer.default_header_display);
        mAreMarginsFixed = getResources().getBoolean(R.bool.default_margins_fixed);
    }

    db = FlashcardDb.getInstance(getActivity().getApplicationContext());
    flashcards = db.getAllFlashcards();
    Log.d(TAG, "onViewCreated: flashcards.size() = " + flashcards.size());
    rv.setLayoutManager(new LayoutManager(getActivity()));
    //OverScrollDecoratorHelper.setUpOverScroll(rv, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
    adapter = new RVMainAdapter(getActivity(), mHeaderDisplay, Utils.getFlashcardsInAlphabeticalOrder(flashcards));
    adapter.setMarginsFixed(mAreMarginsFixed);
    adapter.setHeaderDisplay(mHeaderDisplay);
    rv.setAdapter(new ScaleInAnimationAdapter(new AlphaInAnimationAdapter(adapter)));
    LinearLayout noSets = (LinearLayout) view.findViewById(R.id.no_sets);
    if (Utils.getFlashcardsInAlphabeticalOrder(flashcards).isEmpty())
        noSets.setVisibility(View.VISIBLE);
    else
        noSets.setVisibility(View.GONE);


}
 
开发者ID:AbduazizKayumov,项目名称:Flashcard-Maker-Android,代码行数:34,代码来源:AllSetsFragment.java

示例14: onViewCreated

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    if (savedInstanceState != null) {
        mHeaderDisplay = savedInstanceState
                .getInt(KEY_HEADER_POSITIONING,
                        getResources().getInteger(R.integer.default_header_display));
        mAreMarginsFixed = savedInstanceState
                .getBoolean(KEY_MARGINS_FIXED,
                        getResources().getBoolean(R.bool.default_margins_fixed));
    } else {
        mHeaderDisplay = getResources().getInteger(R.integer.default_header_display);
        mAreMarginsFixed = getResources().getBoolean(R.bool.default_margins_fixed);
    }

    db = FlashcardDb.getInstance(getActivity().getApplicationContext());
    flashcards = db.getAllFlashcards();
    Log.d(TAG, "onViewCreated: flashcards.size() = " + flashcards.size());
    rv.setLayoutManager(new LayoutManager(getActivity()));
    //OverScrollDecoratorHelper.setUpOverScroll(rv, OverScrollDecoratorHelper.ORIENTATION_VERTICAL);
    adapter = new RVMainAdapter(getActivity(), mHeaderDisplay, Utils.getFlashcardsByLabel(flashcards, getString(R.string.menu_todo)));
    adapter.setMarginsFixed(mAreMarginsFixed);
    adapter.setHeaderDisplay(mHeaderDisplay);
    rv.setAdapter(new ScaleInAnimationAdapter(new AlphaInAnimationAdapter(adapter)));

    String label = getArguments().getString("title", "aksjdhiqwhe27813487132647813");

    LinearLayout noSets = (LinearLayout) view.findViewById(R.id.no_sets);
    if (Utils.getFlashcardsByLabel(flashcards, label).isEmpty())
        noSets.setVisibility(View.VISIBLE);
    else
        noSets.setVisibility(View.GONE);
}
 
开发者ID:AbduazizKayumov,项目名称:Flashcard-Maker-Android,代码行数:35,代码来源:LabelFragment.java

示例15: setWeatherData

import jp.wasabeef.recyclerview.adapters.ScaleInAnimationAdapter; //导入依赖的package包/类
public void setWeatherData(WeatherBean weatherData, HuangLiBean huangLiData, ConstellationBean constellationData) {
    mWeatherData = weatherData;
    mBasicRvAdapter = new BasicRvAdapter(getContext(), mWeatherData, huangLiData, constellationData);
    ScaleInAnimationAdapter scaleAdapter = new ScaleInAnimationAdapter(mBasicRvAdapter);
    scaleAdapter.setFirstOnly(false);
    mBasicRecyclerView.setAdapter(scaleAdapter);
}
 
开发者ID:Codpoe,项目名称:OnlyWeather,代码行数:8,代码来源:BasicFragment.java


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