本文整理汇总了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();
}
}
});
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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);
}
});
}
示例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();
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}