I want custom Adapter


I inherited TweetTimelineListAdapter and made CustomTweetTimelineAdapter.
But I cant use “setTimelineFilter”.

This is because you must use the TimelineDelegate to inherit the timelinefilter.
However, TimelineDelegate is a private property.
What’s the use of TimelineFilter in CustomAdapter?

public class CustomTweetTimelineAdapter extends TweetTimelineListAdapter {


You can extend TweetTimelineListAdapter or TweetTimelineRecyclerViewAdapter. Don’t use the builder pattern to avoid the issue with TimelineDelegate being private.


public class CustomRecyclerViewAdapter extends TweetTimelineRecyclerViewAdapter {
    public CustomRecyclerViewAdapter(Context context, Timeline<Tweet> timeline) {
        super(context, timeline);

    public CustomRecyclerViewAdapter(Context context, Timeline<Tweet> timeline, int styleResId, Callback<Tweet> cb) {
        super(context, timeline, styleResId, cb);

    public TweetViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {

        // Override View Holder
        return super.onCreateViewHolder(parent, viewType);


final UserTimeline userTimeline = new UserTimeline.Builder().screenName("twitterdev").build();
CustomRecyclerViewAdapter customRecyclerViewAdapter = new CustomRecyclerViewAdapter(this, userTimeline);

… then set your RecyclerView to use customRecyclerViewAdapter


The current structure can not use setTimelineFilter unless you use the Build pattern.

I want use “setTimelineFilter”.
Please reply. Thank you.