Last active
August 30, 2018 19:02
-
-
Save kosiara/3ae7ae7b81fc257b46ebfc49d6ef08a5 to your computer and use it in GitHub Desktop.
Custom Twitter TweetView Style
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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