Giter Club home page Giter Club logo

react-native-image-capinsets's People

Contributors

cbabos avatar filippodossena-mozart avatar kamal avatar madsleejensen avatar poberwong avatar shilch avatar yurykorzun 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

Watchers

 avatar  avatar  avatar

react-native-image-capinsets's Issues

Scrolling issue on Android

screenshot_1489084213

I'm using this package for adding bubble image on chat-style app, embedding it in ListView
It works fine on iOS version, and in Android before scrolling up.
But when I scrolled it up, the images' sizes are changed.
Can you please help me to fix this issue?

Regards.

Problem with react-native 0.65

Looks like this package don't work in the react-native 0.65.

09-14 03:15:21.240 29727 29937 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:309)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:242)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at dk.madslee.imageCapInsets.utils.RCTImageLoaderTask.doInBackground(RCTImageLoaderTask.java:27)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at dk.madslee.imageCapInsets.utils.RCTImageLoaderTask.doInBackground(RCTImageLoaderTask.java:12)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:295)
09-14 03:15:21.240 29727 29937 E AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:237)

Why when i upload to play store, the app crash...

Hello,

Someone know why, when i test with release mode on emulator it will works properly, while, when i upload to google play store, and download the app, in a specific screen with this functionality capinsets, the app will crash...

Type is not in the npm registry.

I have installed the package using the command npm i react-native-image-capsinsets --save however I'm getting an error at import statement saying 'Could not find a declaration file for module 'react-native-image-capinsets'.'. When executing 'npm i --save @types/react-native-image-capinsets' I'm receiving Error 404. I'm using Typescript.

npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@types%2freact-native-image-capinsets - Not found
npm ERR! 404
npm ERR! 404 '@types/react-native-image-capinsets@*' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

discrepancy between debug and release rendering

Hi - I have an effect to which I am unclear the issue. When building in debug the module works as expected:
dev
however in release build, it looks like this:
release

the relative code :

render(){
const bubble = StaticIcons.imageForIcon("chat-bubble-light");
const sz = 8;
....
<ImageCapInset
          style={{
            padding: 20
          }}
          source={bubble}
          capInsets={{
            top: sz,
            right: sz,
            bottom: sz,
            left: sz
          }}
        >
          <View>
            <Text>This is a test</Text>
            <Text>This is a test</Text>
            <Text>This is a test</Text>
          </View>
        </ImageCapInset>
....
}

I am unclear how to resolve this issue. Any help is appreciated!

iOS support

Since cap insets are natively supported on android the implementation on that platform should be more or less straightforward. How about iOS support, what are the options?

Android image is different than on iOS

Hello. Did this lib was intend to work like on the iOS? It gives two different results. For iOS it works like RN but for Android it scales images incorrectly.

I'm using:
"react-native": "0.44.0"
"react-native-image-capinsets: "https://github.com/igorczapski/react-native-image-capinsets" - which is modified version for loading already cached files

Original image:
image

Android image with cap insets:
image

iOS image with cap insets:
image

As you can see, on Android - corners and bubble tail not match original image. Any advices? Thanks in advance
MP.

[PROPOSAL] Image can't have children. Proposing ImageBackground

The Android implementation allows adding children which is a great thing I believe.
However the iOS implementation uses Image which simply doesn't allow children.
RN has an ImageBackground implementation by default which also uses Image (so capInsets still available) but also provides using children.

Because of the above I propose to use ImageBackground in ImageCapInsets.ios.js

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.