krotanswers.blogg.se

Android video player with zoom and pan
Android video player with zoom and pan












android video player with zoom and pan
  1. ANDROID VIDEO PLAYER WITH ZOOM AND PAN FULL
  2. ANDROID VIDEO PLAYER WITH ZOOM AND PAN ANDROID

As this class is not an activity class I prefer to keep it in another package.Ħ. In this way you can create a reusable view for the grid view blocks. I am creating a custom grid adapter class for the grid view. + parator + AppConstant.PHOTO_ALBUM) įile listFiles = directory.listFiles() IsSupportedFile() – This will check for supported file extensionsĪndroid.os.Environment.getExternalStorageDirectory() GetFilePaths() – This function will return all image paths of a directory Create another class under helper package named Utils.javaįollowing are major functions defined in Utils class I am creating another class to define reusable functions across applications. Public static final List FILE_EXTN = Arrays.asList("jpg", "jpeg",Ĥ. Public static final String PHOTO_ALBUM = "androidhive" Public static final int GRID_PADDING = 8 // in dp Public static final int NUM_OF_COLUMNS = 3 Make sure that you have some images inside this directory before you start the project.įILE_EXTN – Image file extensions to be supported PHOTO_ALBUM – Name of the photo album directory in the sd card. NUM_OF_COLUMNS – Number of columns to be displayed in Grid view In the following I declared required constant variables Under helper package create a new class named AppConstant.java and paste the following code. Right click on src ⇒ New ⇒ Package and name it as your_package_name.helper. In order to maintaining good project structure I am creating a separate package for storing this kind of helper classes. In this way you don’t have modify much code if you want to change app configuration.Ģ.

android video player with zoom and pan

I am creating a app constant class file to store static variables which will be used across application. I kept my package name as and main activity name as GridViewActivity.java

ANDROID VIDEO PLAYER WITH ZOOM AND PAN ANDROID

Create new project in Eclipse IDE from File ⇒ New ⇒ Android Application Project and fill all the required details. Let’s start with creating a new project Creating new projectġ. And finally adding pinch zooming functionality to fullscreen image.

ANDROID VIDEO PLAYER WITH ZOOM AND PAN FULL

Second is showing selected grid image in full screen slider. First one is building Grid View display of all the images. This project is divided in to three tasks.














Android video player with zoom and pan