default: case 0: mAdapter.openLoadAnimation(BaseQuickAdapter.CUSTOMIN); break; case 1: mAdapter.openLoadAnimation(BaseQuickAdapter.ALPHAIN); break; case 2: mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN); break; case 3: mAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_BOTTOM); break; case 4: mAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_LEFT); break; case 5: mAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_RIGHT); break; case 6: mAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_LEFT_RIGHT); break; case 7: mAdapter.openLoadAnimation(BaseQuickAdapter.SLIDEIN_BOTTOM_TOP); break;
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_animation); tvAnimationType = (TextView) findViewById(R.id.tv_animation_type); tvIsFirstOnly = (TextView) findViewById(R.id.tv_first_only); mRecyclerView = (RecyclerView) findViewById(R.id.rv_list); mRecyclerView.setHasFixedSize(true); mRecyclerView.setLayoutManager(new LinearLayoutManager(this)); mRecyclerView.setAdapter(mAdapter = new BaseQuickAdapter<String, BaseViewHolder>(R.layout.rv_item, getItemDatas()) { @Override protected void convert(BaseViewHolder helper, String item) { helper.setText(R.id.tv_item_text, item); } }); mAdapter.openLoadAnimation(); init(); }
@Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_taobao); mRecyclerView = (RecyclerView) findViewById(R.id.recycler); mButton = (ImageButton) findViewById(R.id.btn_change); mButton.setOnClickListener(this); mRecyclerView.setLayoutManager(new LinearLayoutManager(this)); mRecyclerView.setAdapter(mAdapter = new BaseQuickAdapter<String, BaseViewHolder>(getDatas(), new int[]{R.layout.layout_linear, R.layout.layout_grid}) { @Override protected void convert(BaseViewHolder helper, String item) { helper.setText(R.id.tv_name, item); } }); mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN); mAdapter.isFirstOnly(false); mAdapter.setOnLoadMoreListener(new BaseQuickAdapter.RequestLoadMoreListener() { @Override public void onLoadMoreRequested() { new Handler().postDelayed(new Runnable() { @Override public void run() { mAdapter.addData(addDatas()); mAdapter.loadMoreComplete(); } }, 1500); } }); }
mAdapter.openLoadAnimation(BaseQuickAdapter.SCALEIN);