Hi all!
I need to customize a TweetTimeline by adding an identification number at the left part of each tweet, something like the following image:
Before creating my own Adapter and trying to read each Tweet from List<Tweet>, I want to know if I can edit somehow the TweetTimelineListAdapter in order to change the layout of each element. Is this possible?
The code that I am using for obtaining the List<Tweet> object is the following:
TwitterApiClient twitterApiClient = TwitterCore.getInstance().getApiClient();
StatusesService statusesService = twitterApiClient.getStatusesService();
Call<List<Tweet>> call = statusesService.homeTimeline(200,null,null,false,false,true,true);
call.enqueue(new Callback<List<Tweet>>() {
@Override
public void success(Result<List<Tweet>> result) {
ListView listView = (ListView) findViewById(R.id.home_list);
final FixedTweetTimeline timeline = new FixedTweetTimeline.Builder()
.setTweets(result.data)
.build();
final TweetTimelineListAdapter adapter = new TweetTimelineListAdapter.Builder(HomeTimelineActivity.this)
.setTimeline(timeline)
.build();
listView.setAdapter(adapter);
}
@Override
public void failure(TwitterException exception) {
Toast.makeText(HomeTimelineActivity.this,exception.toString(),Toast.LENGTH_SHORT).show();
}
});