Search in sources :

Example 1 with RecyclerListener

use of android.support.v7.widget.RecyclerView.RecyclerListener in project android_frameworks_base by AOSPA.

the class DirectoryFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mInflater = inflater;
    final View view = inflater.inflate(R.layout.fragment_directory, container, false);
    mMessageBar = MessageBar.create(getChildFragmentManager());
    mProgressBar = view.findViewById(R.id.progressbar);
    mEmptyView = view.findViewById(android.R.id.empty);
    mRecView = (RecyclerView) view.findViewById(R.id.dir_list);
    mRecView.setRecyclerListener(new RecyclerListener() {

        @Override
        public void onViewRecycled(ViewHolder holder) {
            cancelThumbnailTask(holder.itemView);
        }
    });
    mRecView.setItemAnimator(new DirectoryItemAnimator(getActivity()));
    // Make the recycler and the empty views responsive to drop events.
    mRecView.setOnDragListener(mOnDragListener);
    mEmptyView.setOnDragListener(mOnDragListener);
    return view;
}
Also used : ViewHolder(android.support.v7.widget.RecyclerView.ViewHolder) RecyclerListener(android.support.v7.widget.RecyclerView.RecyclerListener) ImageView(android.widget.ImageView) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) TextView(android.widget.TextView)

Example 2 with RecyclerListener

use of android.support.v7.widget.RecyclerView.RecyclerListener in project android_frameworks_base by crdroidandroid.

the class DirectoryFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mInflater = inflater;
    final View view = inflater.inflate(R.layout.fragment_directory, container, false);
    mMessageBar = MessageBar.create(getChildFragmentManager());
    mProgressBar = view.findViewById(R.id.progressbar);
    mEmptyView = view.findViewById(android.R.id.empty);
    mRecView = (RecyclerView) view.findViewById(R.id.dir_list);
    mRecView.setRecyclerListener(new RecyclerListener() {

        @Override
        public void onViewRecycled(ViewHolder holder) {
            cancelThumbnailTask(holder.itemView);
        }
    });
    mRecView.setItemAnimator(new DirectoryItemAnimator(getActivity()));
    // Make the recycler and the empty views responsive to drop events.
    mRecView.setOnDragListener(mOnDragListener);
    mEmptyView.setOnDragListener(mOnDragListener);
    return view;
}
Also used : ViewHolder(android.support.v7.widget.RecyclerView.ViewHolder) RecyclerListener(android.support.v7.widget.RecyclerView.RecyclerListener) ImageView(android.widget.ImageView) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) TextView(android.widget.TextView)

Example 3 with RecyclerListener

use of android.support.v7.widget.RecyclerView.RecyclerListener in project platform_frameworks_base by android.

the class DirectoryFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mInflater = inflater;
    final View view = inflater.inflate(R.layout.fragment_directory, container, false);
    mMessageBar = MessageBar.create(getChildFragmentManager());
    mProgressBar = view.findViewById(R.id.progressbar);
    mEmptyView = view.findViewById(android.R.id.empty);
    mRecView = (RecyclerView) view.findViewById(R.id.dir_list);
    mRecView.setRecyclerListener(new RecyclerListener() {

        @Override
        public void onViewRecycled(ViewHolder holder) {
            cancelThumbnailTask(holder.itemView);
        }
    });
    mRecView.setItemAnimator(new DirectoryItemAnimator(getActivity()));
    // Make the recycler and the empty views responsive to drop events.
    mRecView.setOnDragListener(mOnDragListener);
    mEmptyView.setOnDragListener(mOnDragListener);
    return view;
}
Also used : ViewHolder(android.support.v7.widget.RecyclerView.ViewHolder) RecyclerListener(android.support.v7.widget.RecyclerView.RecyclerListener) ImageView(android.widget.ImageView) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) TextView(android.widget.TextView)

Example 4 with RecyclerListener

use of android.support.v7.widget.RecyclerView.RecyclerListener in project android_frameworks_base by DirtyUnicorns.

the class DirectoryFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mInflater = inflater;
    final View view = inflater.inflate(R.layout.fragment_directory, container, false);
    mMessageBar = MessageBar.create(getChildFragmentManager());
    mProgressBar = view.findViewById(R.id.progressbar);
    mEmptyView = view.findViewById(android.R.id.empty);
    mRecView = (RecyclerView) view.findViewById(R.id.dir_list);
    mRecView.setRecyclerListener(new RecyclerListener() {

        @Override
        public void onViewRecycled(ViewHolder holder) {
            cancelThumbnailTask(holder.itemView);
        }
    });
    mRecView.setItemAnimator(new DirectoryItemAnimator(getActivity()));
    // Make the recycler and the empty views responsive to drop events.
    mRecView.setOnDragListener(mOnDragListener);
    mEmptyView.setOnDragListener(mOnDragListener);
    return view;
}
Also used : ViewHolder(android.support.v7.widget.RecyclerView.ViewHolder) RecyclerListener(android.support.v7.widget.RecyclerView.RecyclerListener) ImageView(android.widget.ImageView) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) TextView(android.widget.TextView)

Example 5 with RecyclerListener

use of android.support.v7.widget.RecyclerView.RecyclerListener in project android_frameworks_base by ResurrectionRemix.

the class DirectoryFragment method onCreateView.

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    mInflater = inflater;
    final View view = inflater.inflate(R.layout.fragment_directory, container, false);
    mMessageBar = MessageBar.create(getChildFragmentManager());
    mProgressBar = view.findViewById(R.id.progressbar);
    mEmptyView = view.findViewById(android.R.id.empty);
    mRecView = (RecyclerView) view.findViewById(R.id.dir_list);
    mRecView.setRecyclerListener(new RecyclerListener() {

        @Override
        public void onViewRecycled(ViewHolder holder) {
            cancelThumbnailTask(holder.itemView);
        }
    });
    mRecView.setItemAnimator(new DirectoryItemAnimator(getActivity()));
    // Make the recycler and the empty views responsive to drop events.
    mRecView.setOnDragListener(mOnDragListener);
    mEmptyView.setOnDragListener(mOnDragListener);
    return view;
}
Also used : ViewHolder(android.support.v7.widget.RecyclerView.ViewHolder) RecyclerListener(android.support.v7.widget.RecyclerView.RecyclerListener) ImageView(android.widget.ImageView) RecyclerView(android.support.v7.widget.RecyclerView) View(android.view.View) TextView(android.widget.TextView)

Aggregations

RecyclerView (android.support.v7.widget.RecyclerView)5 RecyclerListener (android.support.v7.widget.RecyclerView.RecyclerListener)5 ViewHolder (android.support.v7.widget.RecyclerView.ViewHolder)5 View (android.view.View)5 ImageView (android.widget.ImageView)5 TextView (android.widget.TextView)5