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();
}
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();
}
}
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());
}
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);
}
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);
}
Aggregations