


A quick search on StackOverflow returned this page. Surprisingly, I could not find a heart icon to use for the like action. White assets are easier to tint the correct color. I also set the color for these vector assets to white. I use mode comment for the comment action, loop for the retweet action, and share for the share action. I found suitable icons for the comment, retweet, and share actions. To learn how to use it, check out Vector Asset Studio. Android Studio provides a tool to create vector assets with the default material icons. The buttons verify that the action row displays on the screen but it does not match the Tweet view. To get something showing in the preview, Button is used as a placeholder for each action.Īdding the ActionRow into the TweetView displays the action buttons in the preview. Another function combines all of these actions into a row. The Retweet and Like actions also have a selected state to modify their appearance.Įach action requires a separate compose function. In my implementation the action row will contain four user actions for a Tweet.Įach of these actions display an image and react to click events. With the Tweet content in place, the action row is the next item to tackle. Updating the function displays the current view in the preview pane in Android Studio. The action row will also be added to this new composable function. This is simplified by combining the UserInfoRow and TweetContent composable items in another composable function. Next up is displaying the content in the preview to verify it looks correct. Since this composable item is not contained in a Row it also needs padding applied to it directly. This content is wrapped in a Text element along with an applied TextStyle. The Tweet content lives between the user information row and the action row. This post focuses on displaying icons for the Tweet’s action row.īut first, a quick detour. My previous blog post covers setting up an Android project with Jetpack Compose and displaying text. (Updated with vector drawing changed from dev07 release)
