Coder Social home page Coder Social logo

react-native-toast's People

Contributors

sky42550564 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-toast's Issues

Toast not showing up on iOS

react-native: 0.34.1

I followed the instructions, rebuilt and tried to trigger it on the app, but no Toaster. I can't seem to find anything on the logs either.

1.0.6,iOS手动添加失败,1.0.5则可用

因为ios没有 toast 才用,本来android也想用,但提示的位置太偏下了,不知道怎么调整(ios的位置可以直接在UIView.m里面调,很方便)。
很奇怪为什么1.0.6不行,1.0.5就可以,而且1.0.5不用去调 Header Search Paths,1.0.6调了也没用。
感谢

module 名称不一致

android的 暴露的module名称与javascript引用不一致。 Toast.java里面写的
@OverRide
public String getName() {
return "RCTToast";
}
与index.js 里面的 var RCTToast= NativeModules.Toast; 对应不上。
应该改为 var RCTToast= NativeModules.RCTToast;

"RCTLog.h" cannot be found

when i import this component, project will be fail with ' "RCTLog.h" cannot be found'!

this is cause by wrong head search path in this project, should replace "$(SRCROOT)/../../../react-native/React" to "$(SRCROOT)/../../react-native/React"

iOS提示找不到路径

iOS需要使用下面的方式安装
方式一: npm install react-native-toast --save
使用: var Toast = require('react-native-toast');
或者: import Toast from 'react-native-toast';

方式二: npm install @remobile/react-native-toast --save
使用: var Toast = require('@remobile/react-native-toast');
或者: import Toast from '@remobile/react-native-toast';

android error undefined is not an object(evaluating 'RECTToast.show')

package.json

"dependencies": {
"@remobile/react-native-toast": "^1.0.5",
}

use

import Toast from '@remobile/react-native-toast';
render() {
return (
<TouchableOpacity onPress={Toast.showShortTop.bind(null, "this is a message")}>
Hello fffworld!

)
}

error:
undefined is not an object(evaluating 'RECTToast.show')
cannot read property 'show' of undefined
May I ask what is the reason?

How to set up on non React Native 0.65 iOS?

I can not run on RN 0.65, manual configuration is not working.


System:
OS: macOS 10.15.2
CPU: (4) x64 Intel(R) Core(TM) i5-5675R CPU @ 3.10GHz
Memory: 657.49 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.12.0 - /usr/local/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 24, 27, 28
Build Tools: 27.0.3, 28.0.3
System Images: android-25 | Google Play Intel x86 Atom
IDEs:
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
react-native-git-upgrade: 0.2.7

Does not compile for release on android with RN 0.57

When I compile this with new RN 0.57 I get the following errors:

The project name '@remobile/react-native-toast' contains at least one of the following characters: [ , /, \, :, <, >, ", ?, *, |]. This has been deprecated and is scheduled to be removed in Gradle 5.0. Set the 'rootProject.name' or adjust the 'include' statement (see https://docs.gradle.org/4.4/dsl/org.gradle.api.initialization.Settings.html#org.gradle.api.initialization.Settings:include(java.lang.String[]) for more details).

> Configure project :@remobile/react-native-toast 
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
Android SDK Build Tools 27.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

and

error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found.
error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values-v26/values-v26.xml:13:5-16:13: AAPT: error: resource android:attr/colorError not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontStyle not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/font not found.
    
/home/mieszko4/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/2894229df102aba6e62f0ed03c56206b/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontWeight not found.
    
error: failed linking references.

This happens when I run for release (for debug it works ok)
I am using com.android.tools.build:gradle:3.1.4
As a workaround the following helps:

subprojects {
    afterEvaluate {project ->
        if (project.hasProperty("android")) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}

I meet this error

Error:A problem occurred configuring project ':app'.

A problem occurred configuring project ':react-native-device-info'.
Could not resolve all dependencies for configuration ':react-native-device-info:_debugCompile'.
> Could not find any matches for com.google.android.gms:play-services-gcm:+ as no versions of com.google.android.gms:play-services-gcm are available.
Searched in the following locations:
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/google/android/gms/play-services-gcm/
https://jitpack.io/com/google/android/gms/play-services-gcm/maven-metadata.xml
https://jitpack.io/com/google/android/gms/play-services-gcm/
file:/Users/jq/.m2/repository/com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/Users/jq/.m2/repository/com/google/android/gms/play-services-gcm/
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/maven-metadata.xml
https://jcenter.bintray.com/com/google/android/gms/play-services-gcm/
file:/Volumes/JQ/ecfs/EcfsCreateCase/node_modules/react-native/android/com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/Volumes/JQ/ecfs/EcfsCreateCase/node_modules/react-native/android/com/google/android/gms/play-services-gcm/
file:/Volumes/Transcend/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/Volumes/Transcend/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-gcm/
file:/Volumes/Transcend/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/maven-metadata.xml
file:/Volumes/Transcend/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-gcm/
Required by:
EcfsCreateCase:react-native-device-info:unspecified

XCode build faild

图示
as the top picture...
build faild,no error, no warn...
so...I don't know how to fix it...

bind方法的第一个参数代表的是什么?

  1. bind方法的第一个参数代表的是什么?
  2. Toast.show.bind方法为什么在普通的Button中的onPress里面无效,是不是必须要在react-native-toast里面的Button的onPress方法才能显示toast

Sample project

Hi, I'm new to Xcode and try to install your toast module.

First it would be helpful to describe the steps more details. Especially I do not fully get the last point...
Look for Header Search Paths and make sure it contains both $(SRCROOT)/../../../react-native/React as recursive.

What should be exactly defined as HEADER_SEARCH_PATHS?

Within React JS file I tried...

import Toast from '@remobile/react-native-toast';
Toast.showLongCenter.bind(null, "this is a message");

But no error and no Toast. Any idea?
Adding a small sample project might be quite helpful.

android message 的前面总是会加上 项目名称

final String message = options.getString("message");
System.out.println("-----" + message);

这是 传递过来的 message.假设 message 为 “Hello world”.
iOS 显示为 Hello world,
android 显示为 项目名:Hello world.

我也做安卓,然而是在不明白这是为什么啊?

Android 编译错误 Unable to find module with Gradle path

编译报错:
Unable to find module with Gradle path ':@remobile/react-native-toast' (needed by module 'app'.)
settings.gradle
include ':@remobile/react-native-toast'
project(':@remobile/react-native-toast').projectDir = new File(rootProject.projectDir, '../node_modules/@remobile/react-native-toast/android')

app 中 build.gradle
compile project(':@remobile/react-native-toast')

请问有人遇到过同样的问题吗?

Android build error

Could not resolve all dependencies for configuration ':@remobile/react-native-toast:debugCompileClasspath'.

请问这是我的项目哪里配置不对吗?

Toast not showing on iPhone if trigger right after a navigate

Hi,

In our project we use react-navigation and we want to display a toast after a a page change.
We first set a delay of 200ms to wait for the user to be on the new page but it was not working and we were forced to wait for 1s.

Here is a part of our saga :

yield put(
      NavigationActions.reset({
        index: 0,
        actions: [NavigationActions.reset({ routeName: 'getStarted' })],
        key: null,
      })
    );
    yield put(setLoading('saveAndExit', false));
    yield call(delay, 1000);
    Toast.showLongBottom(I18n.t('saveAndExitModal.successToast'));

We think it's because it's conflicting with the animation of the page change. Do you have a clue on how to fix this ?

(It's working well on Android with 200ms)

thanks

Toast is not showing in IOS-5s Simulator

Have successfully linked lib with Xcode, but toast is not showing on button click.

var Toast = require('@remobile/react-native-toast');
onChipSelected(id,dataArr){
Toast.show.bind(null, "this is a message");
}

require bug

example bug

should change var Toast = require('react-native-toast');
to var Toast = require('@remobile/react-native-toast');

Can not see Toast in English

I am seeing toast in Chinese language. I assume it is the default behavior of this utility as the repo owner is a Chinese. Is there a way to get toast in English too?

I have added the screenshot for a reference.
screenshot_2017-01-17-13-23-58

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.