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


Java SlideInLeftAnimator类代码示例

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


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

示例1: initViews

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
protected void initViews() {
    RecyclerViewHelper.initRecyclerViewV(mContext, mRvVideoList, mAdapter);
    mRvVideoList.setItemAnimator(new SlideInLeftAnimator());
    mAdapter.setRemoveDataListener(new OnRemoveDataListener() {
        @Override
        public void onRemove(int position) {
            if (mAdapter.getItemCount() <= 1 && mDefaultBg.getVisibility() == View.GONE) {
                mDefaultBg.setVisibility(View.VISIBLE);
                ((DownloadActivity)getActivity()).enableEditMode(false);
            }
        }
    });
    initItemLongClick();
    mPresenter.registerRxBus(VideoInfo.class, new Action1<VideoInfo>() {
        @Override
        public void call(VideoInfo info) {
            mAdapter.addItem(info);
            if (mDefaultBg.getVisibility() == View.VISIBLE) {
                mDefaultBg.setVisibility(View.GONE);
            }
        }
    });
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:25,代码来源:VideoCompleteFragment.java

示例2: initViews

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
protected void initViews() {
    RecyclerViewHelper.initRecyclerViewV(mContext, mRvVideoList, mAdapter);
    mRvVideoList.setItemAnimator(new SlideInLeftAnimator());
    mAdapter.setRemoveDataListener(new OnRemoveDataListener() {
        @Override
        public void onRemove(int position) {
            if (mAdapter.getItemCount() <= 1 && mDefaultBg.getVisibility() == View.GONE) {
                mDefaultBg.setVisibility(View.VISIBLE);
                ((DownloadActivity)getActivity()).enableEditMode(false);
            }
        }
    });
    initItemLongClick();
    mPresenter.registerRxBus(FileInfo.class, new Action1<FileInfo>() {
        @Override
        public void call(FileInfo fileInfo) {
            mAdapter.updateDownload(fileInfo);
        }
    });
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:22,代码来源:VideoCacheFragment.java

示例3: showEvents

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
    public void showEvents(List<DetailEvent> events) {
        int headerHeight = getResources().getDimensionPixelSize(R.dimen.header_bg_height);
        rvDetailEvents.setLayoutManager(new LinearLayoutManager(getActivity()));
        mAdapter = new DetailEventAdapter(events, headerHeight);
        View view = new View(getActivity());
        view.setLayoutParams(new LinearLayoutCompat.LayoutParams(-1, headerHeight));
        mAdapter.addHeaderView(view);
        rvDetailEvents.setAdapter(mAdapter);
//        final StickyRecyclerHeadersDecoration header = new StickyRecyclerHeadersDecoration(mAdapter);
//        rvDetailEvents.addItemDecoration(header);
        rvDetailEvents.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL));
        rvDetailEvents.setItemAnimator(new SlideInLeftAnimator());
        rvDetailEvents.getItemAnimator().setAddDuration(500);
        rvDetailEvents.getItemAnimator().setRemoveDuration(500);
    }
 
开发者ID:Sherchen,项目名称:AnimationsDemo,代码行数:17,代码来源:DetailEventsFragment.java

示例4: onCreate

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);

  handler = new Handler(Looper.getMainLooper());
  mediaDispatcher = new MediaDispatcher(this);

  remoteNotificationManager = new RemoteNotificationManager();
  setContentView(R.layout.activity_main);
  ButterKnife.bind(this);

  textureView.setSurfaceTextureListener(this);

  notificationAdapter = new NotificationAdapter();
  recyclerView.setItemAnimator(new SlideInLeftAnimator(new OvershootInterpolator(.8f)));
  recyclerView.getItemAnimator().setAddDuration(600);
  LinearLayoutManager linearLayoutManager = new LinearLayoutManager(this);
  linearLayoutManager.setAutoMeasureEnabled(true);
  recyclerView.setLayoutManager(linearLayoutManager);
  recyclerView.setAdapter(notificationAdapter);
}
 
开发者ID:Eric-Gonzalez,项目名称:marclay,代码行数:22,代码来源:MainActivity.java

示例5: initRecyclerView

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
public void initRecyclerView() {
//        mLayoutManager = new LinearLayoutManager(activity);        // 创建一个线性布局管理器
//        mRecyclerView.setHasFixedSize(true);        // 提高性能(假如你能确定当你的内容改变时,item布局的大小不会改变时,可使用该方法提高性能)
//        mRecyclerView.setLayoutManager(mLayoutManager);        // 设置布局管理器

        layoutManager = new GridLayoutManager(activity,2);
        recyclerView.setLayoutManager(layoutManager);

        adapter = new ListAdapter(activity,myDataset());
        adapter.setOnItemClickListener(this);
        adapter.setOnItemLongClickListener(this);
        recyclerView.setAdapter(adapter);

        recyclerView.setItemAnimator(new SlideInLeftAnimator());

        recyclerView.getItemAnimator().setAddDuration(300);
        recyclerView.getItemAnimator().setRemoveDuration(300);
        recyclerView.getItemAnimator().setMoveDuration(300);
        recyclerView.getItemAnimator().setChangeDuration(300);
    }
 
开发者ID:Null-Ouwenjie,项目名称:Jide-Note,代码行数:21,代码来源:ListFragment.java

示例6: initRecyclerView

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
public void initRecyclerView() {

        layoutManager = new GridLayoutManager(activity,2);
        recyclerView.setLayoutManager(layoutManager);

        adapter = new BaseNoteAdapter(activity,myDataset());
        adapter.setOnItemClickListener(this);
        adapter.setOnItemLongClickListener(this);
        recyclerView.setAdapter(adapter);

        recyclerView.setItemAnimator(new SlideInLeftAnimator());

        recyclerView.getItemAnimator().setAddDuration(300);
        recyclerView.getItemAnimator().setRemoveDuration(300);
        recyclerView.getItemAnimator().setMoveDuration(300);
        recyclerView.getItemAnimator().setChangeDuration(300);
    }
 
开发者ID:Null-Ouwenjie,项目名称:Jide-Note,代码行数:18,代码来源:ContentFragment.java

示例7: onCreateView

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View v = inflater.inflate(R.layout.fragment_db_test_result_details, container, false);

    mRecyclerView = (RecyclerView) v.findViewById(R.id.resultListView);
    //mRecyclerView.setHasFixedSize(true);
    mRecyclerView.setItemAnimator(new SlideInLeftAnimator());
    mRecyclerView.getItemAnimator().setAddDuration(500);
    mLayoutManager = new LinearLayoutManager(getActivity());
    mRecyclerView.setLayoutManager(mLayoutManager);
    mAdapter = new DbResultAdaptor();
    mRecyclerView.setAdapter(mAdapter);
    mAdapter.setResults(new DbResultModel("Starting Application..."));

    return v;
}
 
开发者ID:koustuvsinha,项目名称:benchmarker,代码行数:19,代码来源:DbTestResultDetails.java

示例8: onActivityCreated

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
public void onActivityCreated(@Nullable Bundle savedInstanceState) {
    super.onActivityCreated(savedInstanceState);
    PriceListFragmentComponent fragmentComponent = mFragmentBaseComponent.
            priceListFragmentComponent(new ActivityModule(getActivity()));
    fragmentComponent.inject(this);
    mRvProduct.setItemAnimator(new SlideInLeftAnimator(new OvershootInterpolator(1f)));
    mRvProduct.getItemAnimator().setAddDuration(500);
    mRvProduct.getItemAnimator().setRemoveDuration(500);
    mRvProduct.setLayoutManager(new LinearLayoutManager(getActivity()));
    mRvProduct.setAdapter(mProductsAdapter);
    mProductsAdapter.setRibots((List<ProductListResponse.Product>) getArguments().getSerializable(BUNDLE_KEY_LIST));
    mProductsAdapter.notifyDataSetChanged();
}
 
开发者ID:ebridfighter,项目名称:GongXianSheng,代码行数:15,代码来源:PriceListFragment.java

示例9: setUpRecyclerView

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
public void setUpRecyclerView() {
    rvRequests.setItemAnimator(new SlideInLeftAnimator());
    rvRequests.getItemAnimator().setAddDuration(500);
    rvRequests.getItemAnimator().setRemoveDuration(500);
    rvRequests.getItemAnimator().setMoveDuration(500);
    rvRequests.getItemAnimator().setChangeDuration(500);

    LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
    rvRequests.setLayoutManager(layoutManager);

    requestAdapter = new RequestAdapter(getContext(), requests, handler, runnable);
    rvRequests.setAdapter(requestAdapter);

}
 
开发者ID:RubitOrganization,项目名称:Rubit,代码行数:16,代码来源:FaceFragment.java

示例10: receiveImageList

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
public void receiveImageList(final List<TypeImageDomain> typeImageDomains) {
    if (mAdapter == null) {
        mAdapter = new CommonAdapter<TypeImageDomain>(TypeImageActivity.this, R.layout.view_item_type_image, typeImageDomains) {
            @Override
            public void convert(final ViewHolder holder, final TypeImageDomain typeImageDomain) {
                holder.setImageWithUrlAndSize(R.id.imageView, typeImageDomain.getUrl(), typeImageDomain.getWidth(), typeImageDomain.getHeight());
                holder.setOnClickListener(R.id.imageView, new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        Intent intent = new Intent(TypeImageActivity.this, ImageViewPagerActivity.class);
                        intent.putParcelableArrayListExtra("imagelist", (ArrayList<TypeImageDomain>) typeImageDomains);
                        intent.putExtra("position", holder.getCurPosition());
                        ActivityOptionsCompat options =
                                ActivityOptionsCompat.makeSceneTransitionAnimation(TypeImageActivity.this);
                        ActivityCompat.startActivity(TypeImageActivity.this, intent, options.toBundle());
                    }
                });
            }
        };
        mLayoutManager = new LinearLayoutManager(TypeImageActivity.this);
        mRecyclerView.setLayoutManager(mLayoutManager);
        mRecyclerView.setItemAnimator(new SlideInLeftAnimator());
        //设置item之间的间隔
        SpacesItemDecoration decoration = new SpacesItemDecoration(5);
        mRecyclerView.addItemDecoration(decoration);
        mRecyclerView.setAdapter(mAdapter);

    } else {
        mAdapter.notifyDataSetChanged();

    }
}
 
开发者ID:flyou,项目名称:Girls,代码行数:34,代码来源:TypeImageActivity.java

示例11: onCreate

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    setTheme(R.style.AppTheme);
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_history);
    shortcutHistory = getIntent().getStringExtra("shortcut_history");
    toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    if (shortcutHistory != null && shortcutHistory.equals("yes")) {
        toolbar.setNavigationIcon(R.drawable.ic_close_white);
    } else {
        toolbar.setNavigationIcon(R.drawable.ic_back_title_white);
    }
    toolbar.setNavigationOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            onBackPressed();
        }
    });
    toolbar.setTitle(R.string.title_activity_history);
    toolbar.setTitleTextColor(ContextCompat.getColor(this, R.color.colorTextLight));

    rv = (RecyclerView) findViewById(R.id.recyclerViewerHistory);
    rv.hasFixedSize();
    rv.setLayoutManager(new LinearLayoutManager(this));
    rv.setItemAnimator(new SlideInLeftAnimator());
    adapter = new HistoryAdapter(this, historyDatas);

    retrieve();

}
 
开发者ID:RiccardoBusetti,项目名称:Colombo,代码行数:32,代码来源:HistoryActivity.java

示例12: onCreate

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    showActionBar(getString(R.string.message_title));
    mRecyclerView.setAdapter(mAdapter);
    SlideInLeftAnimator animator =  new SlideInLeftAnimator();
    mRecyclerView.setItemAnimator(animator);
    mRecyclerView.addItemDecoration(new BaseItemDecoration(0,0,Utils.dp2pixel(1),0));
    requestPresentRefresh();
}
 
开发者ID:MoonRune,项目名称:CuiTrip,代码行数:11,代码来源:MessageListActivity.java

示例13: receiveImageList

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
public void receiveImageList(List<ImageListDomain> imageListDomains) {
    if (null == imageListDomains || imageListDomains.size() == 0) {
        Toast.makeText(context, "没有发现更多数据", Toast.LENGTH_SHORT).show();
        return;
    }

    if (mCurrentPage == 1) {
        mImageListDomains=imageListDomains;
        mAdapter = new CommonAdapter<ImageListDomain>(context, R.layout.view_item_fragment_main, mImageListDomains) {
            @Override
            public void convert(ViewHolder holder, final ImageListDomain imageListDomain) {
                holder.setText(R.id.tv_title, imageListDomain.getImgaeTitle());
                holder.setImageWithUrl(R.id.iv_cover, imageListDomain.getImageUrl());
                holder.setOnClickListener(R.id.iv_cover, new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        Intent intent=new Intent(context,TypeImageActivity.class);
                        intent.putExtra("linkUrl",imageListDomain.getLinkUrl());
                        intent.putExtra("title",imageListDomain.getImgaeTitle());
                        ActivityOptionsCompat options =
                                ActivityOptionsCompat.makeSceneTransitionAnimation(context);
                        ActivityCompat.startActivity(context, intent, options.toBundle());
                    }
                });
            }
        };
        mLayoutManager = new LinearLayoutManager(context);
        mRecyclerView.setLayoutManager(mLayoutManager);
        mRecyclerView.setItemAnimator(new SlideInLeftAnimator());

        mRecyclerView.setAdapter(mAdapter);
        mRecyclerView.addOnScrollListener(mOnScrollListener);
    } else {
        int lastPosition = mImageListDomains.size() - 1;
        mImageListDomains.addAll(imageListDomains);
        mAdapter.notifyItemRangeInserted(lastPosition, imageListDomains.size());
    }


}
 
开发者ID:flyou,项目名称:Girls,代码行数:42,代码来源:ShaoNvFragment.java

示例14: receiveImageList

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
public void receiveImageList(List<ImageListDomain> imageListDomains) {
    if (null == imageListDomains || imageListDomains.size() == 0) {
        Toast.makeText(context, "没有发现更多数据", Toast.LENGTH_SHORT).show();
        return;
    }

    if (mCurrentPage == 1) {
        mImageListDomains=imageListDomains;
        mAdapter = new CommonAdapter<ImageListDomain>(context, R.layout.view_item_fragment_main, mImageListDomains) {
            @Override
            public void convert(ViewHolder holder, final ImageListDomain imageListDomain) {
                holder.setText(R.id.tv_title, imageListDomain.getImgaeTitle());
                holder.setImageWithUrl(R.id.iv_cover, imageListDomain.getImageUrl());
                holder.setOnClickListener(R.id.iv_cover, new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {

                        Intent intent=new Intent(context,TypeImageActivity.class);
                        intent.putExtra("linkUrl",imageListDomain.getLinkUrl());
                        intent.putExtra("title",imageListDomain.getImgaeTitle());
                        ActivityOptionsCompat options =
                                ActivityOptionsCompat.makeSceneTransitionAnimation(context);
                        ActivityCompat .startActivity(context, intent, options.toBundle());
                    }
                });
            }
        };
        mLayoutManager = new LinearLayoutManager(context);
        mRecyclerView.setLayoutManager(mLayoutManager);
        mRecyclerView.setItemAnimator(new SlideInLeftAnimator());

        mRecyclerView.setAdapter(mAdapter);
        mRecyclerView.addOnScrollListener(mOnScrollListener);
    } else {
        int lastPosition = mImageListDomains.size() - 1;
        mImageListDomains.addAll(imageListDomains);
        mAdapter.notifyItemRangeInserted(lastPosition, imageListDomains.size());
    }


}
 
开发者ID:flyou,项目名称:Girls,代码行数:43,代码来源:NewFragment.java

示例15: receiveImageList

import jp.wasabeef.recyclerview.animators.SlideInLeftAnimator; //导入依赖的package包/类
@Override
public void receiveImageList(List<ImageListDomain> imageListDomains) {
    if (null == imageListDomains || imageListDomains.size() == 0) {

        Toast.makeText(context, "没有发现更多数据", Toast.LENGTH_SHORT).show();
        return;
    }

    if (mCurrentPage == 1) {
        mImageListDomains=imageListDomains;
        mAdapter = new CommonAdapter<ImageListDomain>(context, R.layout.view_item_fragment_main, mImageListDomains) {
            @Override
            public void convert(ViewHolder holder, final ImageListDomain imageListDomain) {
                holder.setText(R.id.tv_title, imageListDomain.getImgaeTitle());
                holder.setImageWithUrl(R.id.iv_cover, imageListDomain.getImageUrl());
                holder.setOnClickListener(R.id.iv_cover, new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        Intent intent=new Intent(context,TypeImageActivity.class);
                        intent.putExtra("linkUrl",imageListDomain.getLinkUrl());
                        intent.putExtra("title",imageListDomain.getImgaeTitle());
                        ActivityOptionsCompat options =
                                ActivityOptionsCompat.makeSceneTransitionAnimation(context);
                        ActivityCompat.startActivity(context, intent, options.toBundle());
                    }
                });
            }
        };
        mLayoutManager = new LinearLayoutManager(context);
        mRecyclerView.setLayoutManager(mLayoutManager);
        mRecyclerView.setItemAnimator(new SlideInLeftAnimator());

        mRecyclerView.setAdapter(mAdapter);
        mRecyclerView.addOnScrollListener(mOnScrollListener);
    } else {
        int lastPosition = mImageListDomains.size() - 1;
        mImageListDomains.addAll(imageListDomains);
        mAdapter.notifyItemRangeInserted(lastPosition, imageListDomains.size());
    }


}
 
开发者ID:flyou,项目名称:Girls,代码行数:43,代码来源:MRXTFragment.java


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