
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@fidme/react-native-photo-view
Advanced tools
Provides custom Image view for React Native that allows to perform pinch-to-zoom on images. Works on both iOS and Android.
This component uses PhotoDraweeView for Android and MWPhotobrowser on iOS.
import PhotoView from "@fidme/react-native-photo-view";
Basics:
<PhotoView
source={{ uri: "https://facebook.github.io/react/img/logo_og.png" }}
minimumZoomScale={0.5}
maximumZoomScale={3}
androidScaleType="center"
onLoad={() => console.log("Image loaded!")}
style={{ width: 300, height: 300 }}
/>
Property | Type | Description |
---|---|---|
source | Object | same as source for other React images |
loadingIndicatorSource | Object | source for loading indicator |
fadeDuration | int | duration of image fade (in ms) |
minimumZoomScale | float | The minimum allowed zoom scale. The default value is 1.0 |
maximumZoomScale | float | The maximum allowed zoom scale. The default value is 3.0 |
showsHorizontalScrollIndicator | bool | iOS only: When true, shows a horizontal scroll indicator. The default value is true. |
showsVerticalScrollIndicator | bool | iOS only: When true, shows a vertical scroll indicator. The default value is true. |
scale | float | Set zoom scale programmatically |
androidZoomTransitionDuration | int | Android only: Double-tap zoom transition duration |
androidScaleType | String | Android only: One of the default Android scale types: "center", "centerCrop", "centerInside", "fitCenter", "fitStart", "fitEnd", "fitXY" |
onLoadStart | func | Callback function |
onLoad | func | Callback function |
onLoadEnd | func | Callback function |
onProgress | func | iOS only: Callback function, invoked on download progress with {nativeEvent: {loaded, total}}. |
onTap | func | Callback function (called on image tap) |
onViewTap | func | Callback function (called on tap outside of image) |
onScale | func | Callback function |
react-native-image-zoom functionality is similar, but there are several major differencies:
Just two simple steps:
npm install --save @fidme/react-native-photo-view
react-native link @fidme/react-native-photo-view
android/settings.gradle
include ':@fidme/react-native-photo-view'
project(':@fidme/react-native-photo-view').projectDir = new File(rootProject.projectDir, '../node_modules/@fidme/react-native-photo-view/android')
android/app/build.gradle
dependencies {
compile project(':@fidme/react-native-photo-view')
}
MainActivity.java
for RN < 0.29 and to your MainApplication.java
for RN >=0.29To register PhotoViewPackage
, you need to change the MainActivity
or MainApplication
depending on React Native version of your app:
import com.reactnative.photoview.PhotoViewPackage;
// ...
public class MainActivity extends ReactActivity {
// ...
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new PhotoViewPackage() // add this manager
);
}
// ...
}
pod '@fidme/react-native-photo-view', path: './node_modules/@fidme/react-native-photo-view'
pod install
FAQs
Displaying photos with pinch-to-zoom
The npm package @fidme/react-native-photo-view receives a total of 0 weekly downloads. As such, @fidme/react-native-photo-view popularity was classified as not popular.
We found that @fidme/react-native-photo-view demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.