/** * Sample React Native App * https://github.com/facebook/react-native * * @format * @flow */ import React, { Component } from "react"; import { Platform, StyleSheet, Text, View, Image, TouchableOpacity, ImageBackground, FlatList, Button, DeviceEventEmitter } from "react-native"; import AndroidUtil from "../../util/AndroidUtil"; import BasePage from "../BasePage"; import CourseTitle from "./CourseTitle"; import ScheduleFlatItem from "./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 SchedulePage extends BasePage { render() { return ( this.goBack()} backPress={() => alert("点击返回")} sharedpress={() => alert("点击分享")} /> ( )} renderItem={({ item }) => { return this.loadFlatItem(item); }} keyExtractor={(item, index) => item.key.toString()} horizontal={false} data={[ { key: 1, typecolor: "#74E0FF", typename: "习惯养成", videoname: "碗里不剩一粒米", videourl: "xxxx" }, { key: 2, typecolor: "#FB5B76", typename: "品格礼仪", videoname: "我有很多朋友", videourl: "xxxx" }, { key: 3, typecolor: "#EC48E1", typename: "自我保护", videoname: "小猫喵喵叫", videourl: "xxxx" }, { key: 4, typecolor: "#39D6B9", typename: "亲子游戏", videoname: "安静的睡前游戏-全家人都睡了", videourl: "xxxx" }, { key: 5, typecolor: "#3397F0", typename: "欢乐音乐", videoname: "小鸡捉虫子", videourl: "xxxx" } ]} /> ); } loadFlatItem(data) { return ( ); } }