Git Product home page Git Product logo

rnmusicplayer's Introduction

show

Tech

  • react-native
  • 引入数据状态管理redux
  • 引入数据库realm
  • 引入redux持久库 redux-pressist(这个还不知道怎么用)

Source

Demo

Solution

一些报错提示及解决方案参考

  • overlay permissions needs to be granted in order for react native apps to run in dev mode 需要开启悬浮窗权限
  • could not connect to development server adb reverse tcp:8081 tcp:8081
  • 关于简书上的一些解决方案 http://www.jianshu.com/p/d1f15da51317

启动白屏解决方案

  • 使用的是 https://github.com/crazycodeboy/react-native-splash-screen
  • 大部分配置和其他类库相似
  • 需要新建文件夹和配置文件
  • 修改MainActivity.java 中的getMainComponentName方法 在return之前添加 SplashScreen.show(this);
  • 实现效果是一张背景图片取代白屏 暂时没有动画
  • src/main/res/values/styles.xml + true
  • src/main/drawable-xhdpi/....png
  • src/main/drawable-xxdpi/....png
  • src/main/res/layout/launch_screen.xml
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical" android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@drawable/launch_screen">
 </LinearLayout>```

### 关于开发规范的一些建议
- 生命周期钩子放在render方法之前
- global开头声明全局变量

### 关于更新功能提示动画页面
- 基于react-native-scrollable-tab-view实现    tabbar透明子view不透明
- tabbarposition="bottom"  不能去掉  否则出现zIndex不够的情况
- 滑动tab的时候tabbar是重新渲染的   整个重新创建和渲染

### 关于沉浸式状态栏的一些操作(就是电量显示那一信息栏隐藏或者其他操作)
- 需求  view不计入statusbar  translucent={false} 默认不计入
- 需求 计入statusbar  translucent={true}  
- 需求 要实现一直的背景色  android backgroundColor属性   ios  style
- 隐藏statusbar  hidden属性  default false

### 关于预加载图片的解决方案猜想
- 在服务端预先处理好   转换成base64数据
- {{uri: base64}}
- 编码解码base64   https://github.com/riyadhalnur/node-base64-image/blob/master/docs/docs.md


### 一些认识
- [x] redux-persist 传入数据库引擎对象满足一定标准的就可以  然后就会进行操作


rnmusicplayer's People

Contributors

chunmu avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.