Created
April 30, 2017 08:45
-
-
Save tatocaster/641ddf2a256e9f4d9a5959cd89db5398 to your computer and use it in GitHub Desktop.
MyActivity Litho
This file contains 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
public class MyActivity extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
final ComponentContext context = new ComponentContext(this); | |
final Component component = Text.create(context) | |
.text("Hello World!") | |
.textColor(Color.RED) | |
.textSizeDip(50) | |
.textStyle(BOLD) | |
.build(); | |
setContentView(LithoView.create(context, component)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment