Display random tweet inside Android

android
embeddedtweet

#1

I’m working on a news app and it turns out that many posts have tweets embedded within them… I successfully managed to integrate the TweetView, I tested it and it works fine…However from what I saw, it looks like (correct me if I’m wrong…) the Id of the tweet HAS TO BE KNOWN AT COMPILE TIME…Be it in the XML or the Activity/Fragment the ID is always provided at compile time…

Now I have a layout which is supposed to have some widgets from android here and there (ImageView, TextView, EditText…etc)…I wish to also inflate the TweetView in my XML file…

Is there a way to inflate the TweetView in an xml file and loading the Id of the Tweet at runtime ?