vovkasm / react-native-web-image

An image component for react-native with persistent disk and memory caching.
MIT License
146 stars 25 forks source link

If I use it as a wrapper in Android I get the error android.widget.imageview cannot be cast to android.view.viewgroup #3

Open nbastoWM opened 7 years ago

nbastoWM commented 7 years ago

I'm using an Image as a wrapper so I can place another image and text over it.

I changed it to WebView and I was testing on iOS with no problem but in Android I get the error: android.widget.imageview cannot be cast to android.view.viewgroup

vovkasm commented 7 years ago

Thank you! Yes, I will try to fix it before next version. This or next week.

jordanmkoncz commented 7 years ago

Just a note that I also ran into this same issue when trying to nest a <View> inside of a <WebImage> component. I have the following dependencies:

"react": "~15.4.0",
"react-native": "0.41.2",
"react-native-web-image": "^0.0.4",
vovkasm commented 7 years ago

Yes, still not fixed. But workaround should be simple.

Original Image component from RN also has this issue, they wrap it in View. For reference: https://github.com/facebook/react-native/blob/v0.44.0-rc.0/Libraries/Image/Image.android.js#L318-L339

rishabh-pandey-sternx commented 7 years ago

@vovkasm @jordanmkoncz @nbastoWM any progress in this . I an not able to use this package in android .in IOS it works fine can you guys suggest me the workaround if it is not fixable .

vovkasm commented 7 years ago

Still on my TODO... currently I have very slow progress with this module, but hope to make new version before mid august.

But I still wonder, why not simple embed this component in View (RN itself doing the same, see my previous comment)?