1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- /**
- * Sample React Native App
- * https://github.com/facebook/react-native
- *
- * @format
- * @flow
- */
- import React, { Component } from "react";
- import {
- Platform,
- StyleSheet,
- Text,
- View,
- Button,
- DeviceEventEmitter
- } from "react-native";
- import AndroidUtil from "../util/AndroidUtil";
- import BasePage from "./BasePage";
- import Header from "./components/Header";
- import RevisionAge from "./components/RevisionAge";
- import CourseTitle from "./components/CourseTitle";
- import ScheduleFlatItem from "./components/ScheduleFlatItem";
- const instructions = Platform.select({
- ios: "Press Cmd+R to reload,\n" + "Cmd+D or shake for dev menu",
- android:
- "Double tap R on your keyboard to reload,\n" +
- "Shake or press menu button for dev menu"
- });
- type Props = {};
- export default class MainActivity extends BasePage {
- render() {
- return (
- <View style={styles.container}>
- <Text style={styles.welcome}>Welcome to React Native!</Text>
- <Text style={styles.instructions}>To get started, edit App.js</Text>
- <Button title="toast" onPress={() => this.Toast("Main")} />
- <Text style={styles.instructions}>To get started, edit App.js</Text>
- <Button
- title="toWebActivity"
- onPress={() => this.toWebPage("这里写json......")}
- />
- <Text style={styles.instructions}>To get started, edit App.js</Text>
- <Button title="testJssssss" onPress={() => this.testJssss()} />
- <Text style={styles.instructions}>To get started, edit App.js</Text>
- <Button title="back" onPress={() => this.backSchoolAge()} />
- <Header
- uri="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1295208965,3056573814&fm=26&gp=0.jpg"
- width={200}
- height={150}
- username="卡通笨笨熊"
- flowerNumber="123234"
- onPress={() => this.toWebPage("这里写json......")}
- />
- <RevisionAge
- width={150}
- height={50}
- textss="学前"
- onPress={() => this.toWebPage("这里写json......")}
- />
- <Text style={styles.instructions}>To get started, edit App.js</Text>
- <Text style={styles.instructions}>To get started, edit App.js</Text>
- <ScheduleFlatItem width={this.getWindowWidth()} height={30} />
- </View>
- );
- }
- }
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- justifyContent: "center",
- alignItems: "center",
- backgroundColor: "black"
- },
- welcome: {
- fontSize: 20,
- textAlign: "center",
- margin: 10
- },
- instructions: {
- textAlign: "center",
- color: "#333333",
- marginBottom: 5
- }
- });
|