Skip to content

Instantly share code, notes, and snippets.

@kosiara
Last active August 30, 2018 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosiara/3ae7ae7b81fc257b46ebfc49d6ef08a5 to your computer and use it in GitHub Desktop.
Save kosiara/3ae7ae7b81fc257b46ebfc49d6ef08a5 to your computer and use it in GitHub Desktop.
Custom Twitter TweetView Style
<resources>
<style name="CustomTwitterStyle" parent="tw__TweetLightStyle">
<item name="tw__tweet_actions_enabled">false</item>
<!-- default values -->
<item name="tw__container_bg_color">@color/tw__tweet_light_container_bg_color</item>
<item name="tw__primary_text_color">@color/tw__tweet_light_primary_text_color</item>
<item name="tw__action_color">@color/tw__tweet_action_color</item>
<item name="tw__action_highlight_color">@color/tw__tweet_action_light_highlight_color</item>
</style>
</resources>
override fun success(result: Result<Tweet>?) {
val tweet = result!!.data
componentInstance.addView(TweetView(componentInstance.context, tweet, R.style.CustomTwitterStyle))
invalidate()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment