Search in sources :

Example 61 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project u2020 by JakeWharton.

the class TrendingView method onFinishInflate.

@Override
protected void onFinishInflate() {
    super.onFinishInflate();
    ButterKnife.bind(this);
    AnimationDrawable ellipsis = (AnimationDrawable) ContextCompat.getDrawable(getContext(), R.drawable.dancing_ellipsis);
    loadingMessageView.setCompoundDrawablesWithIntrinsicBounds(null, null, ellipsis, null);
    ellipsis.start();
    toolbarView.setNavigationIcon(R.drawable.menu_icon);
    toolbarView.setNavigationOnClickListener(v -> drawerLayout.openDrawer(GravityCompat.START));
    timespanView.setAdapter(timespanAdapter);
    timespanView.setSelection(TrendingTimespan.WEEK.ordinal());
    swipeRefreshView.setColorSchemeResources(R.color.accent);
    swipeRefreshView.setOnRefreshListener(this);
    trendingAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {

        @Override
        public void onChanged() {
            animatorView.setDisplayedChildId(//
            trendingAdapter.getItemCount() == 0 ? //
            R.id.trending_empty : R.id.trending_swipe_refresh);
            swipeRefreshView.setRefreshing(false);
        }
    });
    trendingView.setLayoutManager(new LinearLayoutManager(getContext()));
    trendingView.addItemDecoration(new DividerItemDecoration(getContext(), VERTICAL_LIST, dividerPaddingStart, safeIsRtl()));
    trendingView.setAdapter(trendingAdapter);
}
Also used : AnimationDrawable(android.graphics.drawable.AnimationDrawable) RecyclerView(android.support.v7.widget.RecyclerView) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(com.jakewharton.u2020.ui.misc.DividerItemDecoration)

Example 62 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.

the class HeaderTypesFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.recycleview_layout, container, false);
    mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    createAdapter(mRecyclerView);
    return v;
}
Also used : DividerItemDecoration(de.madcyph3r.example.DividerItemDecoration) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Example 63 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.

the class ListenerFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.recycleview_layout, container, false);
    mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    createAdapter(mRecyclerView);
    return v;
}
Also used : DividerItemDecoration(de.madcyph3r.example.DividerItemDecoration) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ImageView(android.widget.ImageView) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) View(android.view.View) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Example 64 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.

the class MenuFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.recycleview_layout, container, false);
    mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    createAdapter(mRecyclerView);
    return v;
}
Also used : DividerItemDecoration(de.madcyph3r.example.DividerItemDecoration) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ImageView(android.widget.ImageView) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) View(android.view.View) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Example 65 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project AdvancedMaterialDrawer by madcyph3r.

the class ThemeFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.recycleview_layout, container, false);
    mRecyclerView = (RecyclerView) v.findViewById(R.id.recycler);
    mRecyclerView.setItemAnimator(new DefaultItemAnimator());
    mRecyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
    mRecyclerView.setLayoutManager(new LinearLayoutManager(getActivity()));
    createAdapter(mRecyclerView);
    return v;
}
Also used : DividerItemDecoration(de.madcyph3r.example.DividerItemDecoration) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) ImageView(android.widget.ImageView) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) TextView(android.widget.TextView) DefaultItemAnimator(android.support.v7.widget.DefaultItemAnimator)

Aggregations

LinearLayoutManager (android.support.v7.widget.LinearLayoutManager)73 RecyclerView (android.support.v7.widget.RecyclerView)42 View (android.view.View)36 TextView (android.widget.TextView)23 DefaultItemAnimator (android.support.v7.widget.DefaultItemAnimator)19 DividerItemDecoration (android.support.v7.widget.DividerItemDecoration)15 ImageView (android.widget.ImageView)14 DividerItemDecoration (com.wm.remusic.widget.DividerItemDecoration)9 Drawable (android.graphics.drawable.Drawable)8 DividerItemDecoration (de.madcyph3r.example.DividerItemDecoration)8 DividerItemDecoration (io.hefuyi.listener.widget.DividerItemDecoration)7 Nullable (android.support.annotation.Nullable)6 SwipeRefreshLayout (android.support.v4.widget.SwipeRefreshLayout)6 Context (android.content.Context)5 Toolbar (android.support.v7.widget.Toolbar)5 Intent (android.content.Intent)4 ActionBar (android.support.v7.app.ActionBar)4 DividerItemDecoration (com.lzy.demo.base.DividerItemDecoration)4 DividerItemDecoration (org.michenux.drodrolib.ui.recyclerview.DividerItemDecoration)4 TargetApi (android.annotation.TargetApi)3