Skip to content

leo9843/react-native-full-screen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React image pan and zoom for Android

This is still very basic since I am quite new to React. There is plenty of room for improvment by adding additional react bindings for props and callbacks.

Include in your App

Installation

Install the npm package react-native-image-zoom. Inside your React Native project, run (example):

npm install --save react-native-image-zoom

In android/settings.gradle, remove the line include ':app' and add the following lines

include :react-native-image-zoom'
project(':react-native-image-zoom').projectDir = file('../node_modules/react-native-image-zoom/android')

NOTE : If you have included other libraries in your project, the include line will contain the other dependencies too.

In android/app/build.gradle, add a dependency to ':react-native-image-zoom'

dependencies {
    compile project(':react-native-image-zoom')
}

Next, you need to change the MainActivity of your app to register ReactNativeDialogsPackage :

import com.image.zoom.ReactImageZoom; // add this import

public class MainActivity extends ReactActivity {
    //...

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new ReactImageZoom() // add this manager
      );
    }

About

Full screen functionality for Android

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 41.8%
  • Objective-C 39.0%
  • JavaScript 19.2%