mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-05 22:56:11 +00:00
feat: format project and change in test example default component (#2350)
# Summary Format the whole project.
This commit is contained in:
@@ -35,7 +35,6 @@ import com.facebook.react.uimanager.events.EventDispatcher;
|
||||
import com.facebook.react.views.imagehelper.ImageSource;
|
||||
import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper;
|
||||
import com.horcrux.svg.events.SvgLoadEvent;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
@@ -143,7 +142,8 @@ class ImageView extends RenderableView {
|
||||
public void onNewResultImpl(Bitmap bitmap) {
|
||||
final EventDispatcher mEventDispatcher =
|
||||
UIManagerHelper.getEventDispatcherForReactTag(mContext, getId());
|
||||
mEventDispatcher.dispatchEvent(new SvgLoadEvent(
|
||||
mEventDispatcher.dispatchEvent(
|
||||
new SvgLoadEvent(
|
||||
UIManagerHelper.getSurfaceId(ImageView.this),
|
||||
getId(),
|
||||
mContext,
|
||||
|
||||
@@ -14,10 +14,16 @@ public class SvgLoadEvent extends Event<SvgLoadEvent> {
|
||||
private final float height;
|
||||
private final String uri;
|
||||
|
||||
public SvgLoadEvent(int surfaceId, int viewId, ReactContext mContext, String uriString, float width, float height) {
|
||||
public SvgLoadEvent(
|
||||
int surfaceId,
|
||||
int viewId,
|
||||
ReactContext mContext,
|
||||
String uriString,
|
||||
float width,
|
||||
float height) {
|
||||
super(surfaceId, viewId);
|
||||
ImageSource imageSource = new ImageSource(mContext, uriString);
|
||||
this.uri = imageSource.getSource();;
|
||||
this.uri = imageSource.getSource();
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
@@ -24,5 +24,5 @@ import Test2276 from './src/Test2276';
|
||||
import Test2327 from './src/Test2327';
|
||||
|
||||
export default function App() {
|
||||
return <Test1790 />;
|
||||
return <ColorTest />;
|
||||
}
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
#include <react/renderer/imagemanager/primitives.h>
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <folly/dynamic.h>
|
||||
#include <react/renderer/mapbuffer/MapBuffer.h>
|
||||
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
|
||||
#include <folly/dynamic.h>
|
||||
#endif
|
||||
|
||||
namespace facebook {
|
||||
|
||||
Reference in New Issue
Block a user