嵌入h5页面

1.新建好页面

2. import { WebView } from 'react-native';

3.<WebView source={{ uri: '要引入的页面路径' }}></WebView>

设置顶部导航

static navigationOptions = {
      //导航栏标题
  headerTitle: (
    <Text>今日考勤展示</Text>
  ),
  //返回按钮标题
  headerBackTitle:"返回",

  // 导航条左侧
  headerLeft: (
      <TouchableOpacity onPress={() =>{this.props.navigation.goBack();}}>
              <Image style={{marginLeft:20, width:30, height:30}} source={require("../../Resources/leftBack.png")} resizeMode='center'></Image>
          </TouchableOpacity>
      ),

  // 导航条右侧
      headerRight: (
    <Button title="Info" color="red" onPress={() => {this.props.navigation.navigate('Details')}}/>
  )
}

react native (2) 嵌入h5页面 设置顶部导航的更多相关文章

  1. 安卓 apk 嵌入H5页面只显示部分

    安卓 apk 嵌入H5页面只显示部分(有空白页出现) 解决方案 没有加载的是js部分,需要在安卓那边加上一串代码 webView.getSetting().setDomStorageEnabled(t ...

  2. 移动端学习之理解WEB APP、Native APP、Hybrid APP以及React Native/uniapp包括H5、小程序等的区别与共通之处

    因为工作需要,需要进一步了解移动端的开发,遂返回复习移动端的知识点,在开始学习之前,产生了疑惑WEB APP .Native APP .Hybrid APP.React Native.Uniapp.H ...

  3. React Native 的高度与宽度设置

    React Native中的尺寸都是无单位的,表示的是与设备像素密度无关的逻辑像素点. import React, { Component } from 'react'; import { AppRe ...

  4. 小程序-web-view嵌入H5页面遇到的bug

    遇到的问题1:ios页面中,内容过多时有下滑真是功能,但是下滑的时候回看到底部的微信自带的灰色背景及H5的域名(ios的webview中上/下拉露出黑灰色背景问题) 解决办法:给body添加样式--- ...

  5. React Native商城项目实战07 - 设置“More”界面导航条

    1.More/More.js /** * 更多 */ import React, { Component } from 'react'; import { AppRegistry, StyleShee ...

  6. React Native商城项目实战08 - 设置“More”界面cell

    1.自定义可复用的cell More/CommonCell.js: /** * 自定义可复用的cell */ import React, { Component } from 'react'; imp ...

  7. react native 中实现个别页面禁止截屏

    这里主要用到了原生模块,下面贴出FlagSecureModule.java的代码 package com.studyproj.flagsecure; import android.util.Log; ...

  8. react native jpush跳转页面不成功解决方法

    在点击事件时加入如下红色代码即可 import JPushModule from 'jpush-react-native'; ... componentDidMount() { // 新版本必需写回调 ...

  9. React Native商城项目实战05 - 设置首页的导航条

    1.Home.js /** * 首页 */ import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Te ...

随机推荐

  1. LR实现问答系统查询功能

    脚本中未对问题进行参数化处理,关键点在于关联取值和web_add_header()函数的使用 Action() { web_url("首页", "URL=http://q ...

  2. 【LeetCode刷题系列 - 002题】Add Two Numbers

    题目: You are given two non-empty linked lists representing two non-negative integers. The digits are ...

  3. eclipse在mac上的快捷键

    Command + Shift + R: 搜索本地项目文件 Command + Shift + T: 搜索jar中的文件 Command+t:快速显示当前类的结构 command+O: 在某个类文件, ...

  4. 识别手机浏览器代码【C#和JS两种语言】

    C# 识别手机浏览器代码: public static bool MobileBrowserDetect() { bool bismobile = false; try { #region 包含and ...

  5. Windows Server 2012 正式版/标准版/数据中心版安装序列号密钥

    Windows Server 2012(开发代号:Windows Server 8)是微软发布的一款服务器操作系统,也是Windows 8对应的服务器版本,属于是Windows Server 2008 ...

  6. 意想不到的的异常-由于eclipse和tomcat的交互出错-eclipse断点导致debug启动缓慢

    足足启动了200多秒,正赶上hibernate 的使用上全部换使用方式,修改了很多代码.赶在这个节骨点上,出现debug 启动时卡在hibernate 启动的地方不动了,也没掉到debug断点的地方. ...

  7. AWR不能自动生成快照

    尝试手工生成,报错sysaux表空间满. BEGIN DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT (); END; 检查DBA_HIST_SNAPSHOT和dba ...

  8. 关于PHP架构师进阶的一些思考

    相信大家都有感觉,就是当程序员写业务写了几年后,就会有想进阶的想法,技术方面当然就是架构师了,然后具体从哪些方面丰富自己才能个达到目的呢?大部分人可能会很迷茫,当然也包括我, 最近和很多大牛交流了一些 ...

  9. 《笨方法学Python》加分题28

    #!usr/bin/python # -*-coding:utf-8-*- True and True print ("True") False and True print (& ...

  10. pd16.5增加字段备注

    EXEC sp_addextendedproperty 'MS_Description', %.q:COLNNAME%, 'user', dbo, 'table', %TABLE%, 'column' ...