Search in sources :

Example 41 with DefaultItemAnimator

use of android.support.v7.widget.DefaultItemAnimator in project LookLook by xinghongfei.

the class MeiziFragment method initialView.

private void initialView() {
    meiziAdapter = new MeiziAdapter(getContext());
    linearLayoutManager = new WrapContentLinearLayoutManager(getContext());
    intialListener();
    mRecycleMeizi.setLayoutManager(linearLayoutManager);
    mRecycleMeizi.setAdapter(meiziAdapter);
    mRecycleMeizi.addOnScrollListener(loadmoreListener);
    new Once(getContext()).show("tip_guide_6", new Once.OnceCallback() {

        @Override
        public void onOnce() {
            Snackbar.make(mRecycleMeizi, getString(R.string.meizitips), Snackbar.LENGTH_INDEFINITE).setAction(R.string.meiziaction, new View.OnClickListener() {

                @Override
                public void onClick(View view) {
                }
            }).show();
        }
    });
    mRecycleMeizi.setItemAnimator(new DefaultItemAnimator());
    loadDate();
}
Also used : Once(com.looklook.xinghongfei.looklook.util.Once) WrapContentLinearLayoutManager(com.looklook.xinghongfei.looklook.widget.WrapContentLinearLayoutManager) MeiziAdapter(com.looklook.xinghongfei.looklook.adapter.MeiziAdapter) BindView(butterknife.BindView) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Example 42 with DefaultItemAnimator

use of android.support.v7.widget.DefaultItemAnimator in project LookLook by xinghongfei.

the class TopNewsFragment method initialView.

private void initialView() {
    initialListener();
    mLinearLayoutManager = new WrapContentLinearLayoutManager(getContext());
    recycle.setLayoutManager(mLinearLayoutManager);
    recycle.setHasFixedSize(true);
    recycle.addItemDecoration(new GridItemDividerDecoration(getContext(), R.dimen.divider_height, R.color.divider));
    // TODO: 16/8/13 add  animation
    recycle.setItemAnimator(new DefaultItemAnimator());
    recycle.setAdapter(mTopNewsAdapter);
    recycle.addOnScrollListener(loadingMoreListener);
    if (connected) {
        loadDate();
    }
}
Also used : WrapContentLinearLayoutManager(com.looklook.xinghongfei.looklook.widget.WrapContentLinearLayoutManager) GridItemDividerDecoration(com.looklook.xinghongfei.looklook.view.GridItemDividerDecoration) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Example 43 with DefaultItemAnimator

use of android.support.v7.widget.DefaultItemAnimator in project PhotoNoter by yydcdut.

the class MediaPhotoFragment method onViewCreated.

@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
    mMainActivity = (MainActivity) getActivity();
    super.onViewCreated(view, savedInstanceState);
    ButterKnife.bind(this, view);
    GridLayoutManager gridLayoutManager = new GridLayoutManager(getContext(), 3);
    mRecyclerView.setLayoutManager(gridLayoutManager);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Example 44 with DefaultItemAnimator

use of android.support.v7.widget.DefaultItemAnimator in project SwipeRecyclerView by yanzhenjie.

the class MainActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(toolbar);
    RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view);
    recyclerView.setLayoutManager(new StaggeredGridLayoutManager(2, LinearLayoutManager.VERTICAL));
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    recyclerView.addItemDecoration(new RecyclerView.ItemDecoration() {

        @Override
        public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
            outRect.set(10, 10, 10, 15);
        }
    });
    List<String> titles = Arrays.asList(getResources().getStringArray(R.array.main_item));
    List<String> descriptions = Arrays.asList(getResources().getStringArray(R.array.main_item_des));
    MainItemAdapter mainItemAdapter = new MainItemAdapter(titles, descriptions);
    mainItemAdapter.setOnItemClickListener(this);
    recyclerView.setAdapter(mainItemAdapter);
}
Also used : Rect(android.graphics.Rect) RecyclerView(android.support.v7.widget.RecyclerView) StaggeredGridLayoutManager(android.support.v7.widget.StaggeredGridLayoutManager) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) MainItemAdapter(com.yanzhenjie.swiperecyclerview.adapter.MainItemAdapter) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator) Toolbar(android.support.v7.widget.Toolbar)

Example 45 with DefaultItemAnimator

use of android.support.v7.widget.DefaultItemAnimator in project PhotoNoter by yydcdut.

the class AlbumFragment method initUI.

@Override
public void initUI(View view) {
    ButterKnife.bind(this, view);
    mGridLayoutManager = new GridLayoutManager(getContext(), mAlbumPresenter.calculateGridNumber());
    mRecyclerView.setLayoutManager(mGridLayoutManager);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mAlbumPresenter.attachView(this);
    mLayoutRevealView = (RevealView) getActivity().findViewById(R.id.reveal_layout);
}
Also used : GridLayoutManager(android.support.v7.widget.GridLayoutManager) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Aggregations

DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)103 LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)71 RecyclerView (android.support.v7.widget.RecyclerView)63 View (android.view.View)55 TextView (android.widget.TextView)30 ImageView (android.widget.ImageView)25 ArrayList (java.util.ArrayList)16 GridLayoutManager (android.support.v7.widget.GridLayoutManager)14 ClickItemTouchListener (com.sdsmdg.harjot.MusicDNA.clickitemtouchlistener.ClickItemTouchListener)14 Toolbar (android.support.v7.widget.Toolbar)13 SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)10 FastAdapter (com.mikepenz.fastadapter.FastAdapter)10 UnifiedTrack (com.sdsmdg.harjot.MusicDNA.models.UnifiedTrack)10 MaterializeBuilder (com.mikepenz.materialize.MaterializeBuilder)9 ItemTouchHelper (android.support.v7.widget.helper.ItemTouchHelper)8 LocalTrack (com.sdsmdg.harjot.MusicDNA.models.LocalTrack)8 DividerItemDecoration (de.madcyph3r.example.DividerItemDecoration)8 Button (android.widget.Button)7 Random (java.util.Random)6 Intent (android.content.Intent)5