Search in sources :

Example 71 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project YourAppIdea by Michenux.

the class AirportListFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    if (BuildConfig.DEBUG) {
        Log.i(YourApplication.LOG_TAG, "AirportListFragment.onCreateView");
    }
    View view = inflater.inflate(R.layout.airport_listfragment, container, false);
    mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.airport_swiperefreshlayout);
    mSwipeRefreshLayout.setColorSchemeResources(R.color.refresh_progress_1, R.color.refresh_progress_2, R.color.refresh_progress_3);
    mSwipeRefreshLayout.setOnRefreshListener(this);
    RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.airport_recyclerview);
    recyclerView.setHasFixedSize(true);
    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
    linearLayoutManager.setOrientation(OrientationHelper.VERTICAL);
    recyclerView.setLayoutManager(linearLayoutManager);
    recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), null));
    recyclerView.setAdapter(this.mAirportAdapter);
    return view;
}
Also used : RecyclerView(android.support.v7.widget.RecyclerView) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(org.michenux.drodrolib.ui.recyclerview.DividerItemDecoration) View(android.view.View) AdapterView(android.widget.AdapterView) RecyclerView(android.support.v7.widget.RecyclerView)

Example 72 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project YourAppIdea by Michenux.

the class TutorialListFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.tutorial_list, container, false);
    // SwipeRefresh layout
    mSwipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.tutorial_swiperefreshlayout);
    mSwipeRefreshLayout.setOnRefreshListener(this);
    mSwipeRefreshLayout.setColorSchemeResources(R.color.refresh_progress_1, R.color.refresh_progress_2, R.color.refresh_progress_3);
    RecyclerView recyclerView = (RecyclerView) view.findViewById(R.id.tutorial_listview);
    recyclerView.setHasFixedSize(true);
    recyclerView.setLongClickable(false);
    LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());
    linearLayoutManager.setOrientation(OrientationHelper.VERTICAL);
    recyclerView.setLayoutManager(linearLayoutManager);
    recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), null));
    ItemClickSupport.addTo(recyclerView).setOnItemClickListener(this);
    this.getLoaderManager().initLoader(0, null, this);
    this.mAdapter = new TutorialRecyclerAdapter();
    recyclerView.setAdapter(this.mAdapter);
    return view;
}
Also used : RecyclerView(android.support.v7.widget.RecyclerView) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(org.michenux.drodrolib.ui.recyclerview.DividerItemDecoration) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView)

Example 73 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project Remindy by abicelis.

the class TaskFragment method setUpRecyclerView.

private void setUpRecyclerView() {
    mLayoutManager = new LinearLayoutManager(getActivity(), LinearLayoutManager.VERTICAL, false);
    mAdapter = new AttachmentAdapter(getActivity(), mTask.getAttachments(), false);
    mAdapter.setShowAttachmentHintListener(new AttachmentAdapter.ShowAttachmentHintListener() {

        @Override
        public void onShowAttachmentHint() {
            if (!mAttachmentLongClickOptionsDialogHintShown) {
                mAttachmentLongClickOptionsDialogHintShown = true;
                SnackbarUtil.showSnackbar(mContainer, SnackbarUtil.SnackbarType.NOTICE, R.string.fragment_task_snackbar_notice_attachments_options_hint, SnackbarUtil.SnackbarDuration.LONG, null);
            }
        }
    });
    DividerItemDecoration itemDecoration = new DividerItemDecoration(getActivity(), mLayoutManager.getOrientation());
    itemDecoration.setDrawable(ContextCompat.getDrawable(getActivity(), R.drawable.item_decoration_half_line));
    mRecyclerView.setNestedScrollingEnabled(false);
    mRecyclerView.addItemDecoration(itemDecoration);
    mRecyclerView.setLayoutManager(mLayoutManager);
    mRecyclerView.setAdapter(mAdapter);
}
Also used : AttachmentAdapter(ve.com.abicelis.remindy.app.adapters.AttachmentAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(android.support.v7.widget.DividerItemDecoration)

Example 74 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project Tusky by Vavassor.

the class AccountListFragment method onCreateView.

@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View rootView = inflater.inflate(R.layout.fragment_account_list, container, false);
    Context context = getContext();
    recyclerView = (RecyclerView) rootView.findViewById(R.id.recycler_view);
    recyclerView.setHasFixedSize(true);
    layoutManager = new LinearLayoutManager(context);
    recyclerView.setLayoutManager(layoutManager);
    DividerItemDecoration divider = new DividerItemDecoration(context, layoutManager.getOrientation());
    Drawable drawable = ThemeUtils.getDrawable(context, R.attr.status_divider_drawable, R.drawable.status_divider_dark);
    divider.setDrawable(drawable);
    recyclerView.addItemDecoration(divider);
    scrollListener = null;
    if (type == Type.BLOCKS) {
        adapter = new BlocksAdapter(this);
    } else if (type == Type.MUTES) {
        adapter = new MutesAdapter(this);
    } else if (type == Type.FOLLOW_REQUESTS) {
        adapter = new FollowRequestsAdapter(this);
    } else {
        adapter = new FollowAdapter(this);
    }
    recyclerView.setAdapter(adapter);
    return rootView;
}
Also used : Context(android.content.Context) FollowAdapter(com.keylesspalace.tusky.adapter.FollowAdapter) MutesAdapter(com.keylesspalace.tusky.adapter.MutesAdapter) Drawable(android.graphics.drawable.Drawable) BlocksAdapter(com.keylesspalace.tusky.adapter.BlocksAdapter) LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(android.support.v7.widget.DividerItemDecoration) View(android.view.View) RecyclerView(android.support.v7.widget.RecyclerView) FollowRequestsAdapter(com.keylesspalace.tusky.adapter.FollowRequestsAdapter) Nullable(android.support.annotation.Nullable)

Example 75 with DividerItemDecoration

use of android.support.v7.widget.DividerItemDecoration in project bdcodehelper by boredream.

the class MultiPageLoadPresent method initView.

private void initView() {
    srl.setColorSchemeColors(activity.getResources().getColor(R.color.colorPrimary));
    rv = (RecyclerView) srl.findViewById(R.id.rv);
    LinearLayoutManager layoutManager = new LinearLayoutManager(activity, StaggeredGridLayoutManager.VERTICAL, false);
    rv.setLayoutManager(layoutManager);
    itemDecoration = new DividerItemDecoration(activity);
    rv.addItemDecoration(itemDecoration);
}
Also used : LinearLayoutManager(android.support.v7.widget.LinearLayoutManager) DividerItemDecoration(com.boredream.bdcodehelper.view.DividerItemDecoration)

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