How to make timeline nonclickable?

android

#1

But default clicking on tweet opens it in brawser or twitter application. Is it possible to make those twits unclickable?


#2

Hey @frakcMA, Currently this isn’t an option, but could you explain a bit more on why you want to make Tweets unclickable? The user experience when viewing a timeline is intended to allow people to dive into a specific tweet so I’d love to know more.


#3

Hi,
In my case timeline is set of system status update reports, they are self explaining, thus users of my app do no neet ro reply or dig dipper to find more info.


#4

Gotcha, great to know @frakcMA, much appreciated!


#5

theres a workaround
adapter

public class MytweetTimeLineAdapter extends TweetTimelineListAdapter {

  LayoutInflater layoutInflater;

  public MytweetTimeLineAdapter(Context context, Timeline<Tweet> timeline) {
    super(context, timeline);
    layoutInflater = LayoutInflater.from(context);
  }

  @Override public View getView(int position, View convertView, ViewGroup parent) {
    View rowView = convertView;
    if (rowView != null) rowView.setClickable(false);
    final Tweet tweet = getItem(position);
    if (rowView == null) {
      rowView = layoutInflater.inflate(R.layout.listitem_twitter, parent, false);
      ViewHolder viewHolder = new ViewHolder(rowView, tweet);
      rowView.setTag(viewHolder);
    } else {
      ViewHolder h = (ViewHolder) rowView.getTag();
      h.compactTweetView.setTweet(tweet);
    }
    return rowView;
  }

  static class ViewHolder {
    @InjectView(R.id.blockView) View blockView;
    @InjectView(R.id.relativeLayout) RelativeLayout relativeLayout;
    CompactTweetView compactTweetView;

    ViewHolder(View view, Tweet tweet) {
      ButterKnife.inject(this, view);
      compactTweetView = new CompactTweetView(view.getContext(), tweet);
      relativeLayout.addView(compactTweetView);
    }
  }
}

layout
<?xml version="1.0" encoding="utf-8"?>