import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
export default class Splash extends Component {
render() {
return (
<View style={styles.wrapper}>
<Text>Hello World</Text>
</View>
);
}
}
const styles = StyleSheet.create({
wrapper : {
backgroundColor : 'green',
flex : 1,
justifyContent: 'center',
alignItems: 'center'
}
});
import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
export default class Splash extends Component {
render() {
return (
<View style={styles.wrapper}>
<Text>Hello World</Text>
</View>
);
}
}
const styles = StyleSheet.create({
wrapper : {
backgroundColor : 'green',
flex : 1,
justifyContent: 'center',
alignItems: 'center'
}
});
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func showMessage(sender: UIButton) {
let alertController = UIAlertController(title: "Welcome to My First App", message: "Hello World", preferredStyle: UIAlertControllerStyle.alert)
alertController.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
present(alertController, animated: true, completion: nil)
}
}
import React, { Component } from 'react';
import { View, Text, StyleSheet } from 'react-native';
export default class Splash extends Component {
render() {
return (
<View style={styles.wrapper}>
<Text>Hello World</Text>
</View>
);
}
}
const styles = StyleSheet.create({
wrapper : {
backgroundColor : 'green',
flex : 1,
justifyContent: 'center',
alignItems: 'center'
}
});
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func showMessage(sender: UIButton) {
let alertController = UIAlertController(title: "Welcome to My First App", message: "Hello World", preferredStyle: UIAlertControllerStyle.alert)
alertController.addAction(UIAlertAction(title: "OK", style: UIAlertActionStyle.default, handler: nil))
present(alertController, animated: true, completion: nil)
}
}
package br.com.felipesilveira.helloworld;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class HelloWorld extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView view = new TextView(this);
view.setText("Hello, Android");
setContentView(view);
}
}