项目:DominionPicker
文件:FragmentPicker.java
/** Called to create this fragment's view for the first time. */
@Override
public View onCreateView(LayoutInflater inflater,ViewGroup container,Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_picker,container,false);
ButterKnife.bind(this,view);
card_list.setLayoutManager(new LinearLayoutManager(getContext()));
card_list.addItemDecoration(new ListDivider(getContext()));
// Disable flicker animation when an item changes
// (otherwise items will flicker when selection state changes)
ItemAnimator animator = card_list.getItemAnimator();
if (animator instanceof SimpleItemAnimator)
((SimpleItemAnimator) animator).setSupportsChangeAnimations(false);
final SharedPreferences pref = Pref.get(getContext());
adapter = new AdapterCardsFilter(card_list,pref.getString(Pref.FILT_CARD,""),pref.getString(Pref.REQ_CARDS,""));
card_list.setAdapter(adapter);
updateView();
return view;
}
项目:letv
文件:ItemTouchHelper.java
private void postDispatchSwipe(final RecoverAnimation anim,final int swipeDir) {
this.mRecyclerView.post(new Runnable() {
public void run() {
if (ItemTouchHelper.this.mRecyclerView != null && ItemTouchHelper.this.mRecyclerView.isAttachedToWindow() && !anim.mOverridden && anim.mViewHolder.getAdapterPosition() != -1) {
ItemAnimator animator = ItemTouchHelper.this.mRecyclerView.getItemAnimator();
if ((animator == null || !animator.isRunning(null)) && !ItemTouchHelper.this.hasRunningRecoverAnim()) {
ItemTouchHelper.this.mCallback.onSwiped(anim.mViewHolder,swipeDir);
} else {
ItemTouchHelper.this.mRecyclerView.post(this);
}
}
}
});
}
项目:boohee_v5.6
文件:ItemTouchHelper.java
private void postDispatchSwipe(final RecoverAnimation anim,swipeDir);
} else {
ItemTouchHelper.this.mRecyclerView.post(this);
}
}
}
});
}
项目:letv
文件:ItemTouchHelper.java
public long getAnimationDuration(RecyclerView recyclerView,int animationType,float animateDx,float animateDy) {
ItemAnimator itemAnimator = recyclerView.getItemAnimator();
return itemAnimator == null ? animationType == 8 ? 200 : 250 : animationType == 8 ? itemAnimator.getMoveDuration() : itemAnimator.getRemoveDuration();
}
项目:boohee_v5.6
文件:ItemTouchHelper.java
public long getAnimationDuration(RecyclerView recyclerView,float animateDy) {
ItemAnimator itemAnimator = recyclerView.getItemAnimator();
return itemAnimator == null ? animationType == 8 ? 200 : 250 : animationType == 8 ? itemAnimator.getMoveDuration() : itemAnimator.getRemoveDuration();
}
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。