本文整理汇总了Java中jp.wasabeef.recyclerview.animators.FadeInLeftAnimator类的典型用法代码示例。如果您正苦于以下问题:Java FadeInLeftAnimator类的具体用法?Java FadeInLeftAnimator怎么用?Java FadeInLeftAnimator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FadeInLeftAnimator类属于jp.wasabeef.recyclerview.animators包,在下文中一共展示了FadeInLeftAnimator类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: onCreateView
import jp.wasabeef.recyclerview.animators.FadeInLeftAnimator; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
final View view = inflater.inflate(R.layout.fragment_task, container, false);
ButterKnife.bind(this, view);
// Set layout manager
layoutManager = new LinearLayoutManager(getActivity());
((LinearLayoutManager)layoutManager).setOrientation(LinearLayoutManager.VERTICAL);
recyclerView.setLayoutManager(layoutManager);
// Set animator
recyclerView.setItemAnimator(new FadeInLeftAnimator());
// Set recycler
//get unfinished list task是引用 在application里加一下need_add
//
List<Task> need_add = new ArrayList<>();
for (Task task : taskManager.getObjectList()){
if (task.getState()==1){//unfinished
need_add.add(task);
}
}
mAdapter = new TaskRecyclerAdapter(need_add);
if(need_add != null) recyclerView.setAdapter(mAdapter);
else recyclerView.setAdapter(new TaskRecyclerAdapter());
return view;
}
开发者ID:AndroidNewbies,项目名称:Sanxing,代码行数:28,代码来源:TaskFrag.java
示例2: afterViews
import jp.wasabeef.recyclerview.animators.FadeInLeftAnimator; //导入依赖的package包/类
@AfterViews
public void afterViews() {
BGARefreshViewHolder viewholder = new BGANormalRefreshViewHolder(this, true);
viewholder.setLoadingMoreText("正在卖力加载...");
mRefreshLayout.setRefreshViewHolder(viewholder);
NormalLoadingStatusHelper statusHelper = new NormalLoadingStatusHelper(this);
statusHelper.setDataSetEmptyStr("获取的数据集为空");
mRefreshLayout.setLoadingStatusHelper(statusHelper);
mRecyclerView.setLayoutManager(new LinearLayoutManager(this.mContext));
mRecyclerView.setItemAnimator(new FadeInLeftAnimator());
mRefreshLayout.setDataSource(new DataSource(mContext) {
@Override
public void refreshData() {
refresh();
}
@Override
public boolean loadMore() {
return false;
}
});
}
开发者ID:yndongyong,项目名称:fast-dev-library,代码行数:28,代码来源:TestRefreshLoadingStatusHelper.java
示例3: onCreate
import jp.wasabeef.recyclerview.animators.FadeInLeftAnimator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.recyclerview);
recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
ActionBar actionBar = getActionBar();
if (actionBar != null) {
actionBar.setTitle("RecyclerView");
}
}
// Layout Managers:
recyclerView.setLayoutManager(new LinearLayoutManager(this));
// Item Decorator:
recyclerView.addItemDecoration(new DividerItemDecoration(getResources().getDrawable(R.drawable.divider)));
recyclerView.setItemAnimator(new FadeInLeftAnimator());
// Adapter:
String[] adapterData = new String[]{"Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "Florida", "Georgia", "Hawaii", "Idaho", "Illinois", "Indiana", "Iowa", "Kansas", "Kentucky", "Louisiana", "Maine", "Maryland", "Massachusetts", "Michigan", "Minnesota", "Mississippi", "Missouri", "Montana", "Nebraska", "Nevada", "New Hampshire", "New Jersey", "New Mexico", "New York", "North Carolina", "North Dakota", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah", "Vermont", "Virginia", "Washington", "West Virginia", "Wisconsin", "Wyoming"};
mDataSet = new ArrayList<String>(Arrays.asList(adapterData));
mAdapter = new RecyclerViewAdapter(this, mDataSet);
((RecyclerViewAdapter) mAdapter).setMode(Attributes.Mode.Single);
recyclerView.setAdapter(mAdapter);
/* Listeners */
recyclerView.setOnScrollListener(onScrollListener);
}
开发者ID:cxbiao,项目名称:Android_Study_Demos,代码行数:30,代码来源:RecyclerViewExample.java
注:本文中的jp.wasabeef.recyclerview.animators.FadeInLeftAnimator类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论