Code Monkey home page Code Monkey logo

photobrowser.forms's Introduction

PhotoBrowser.Forms

Full screen image viewer(Xamarin.Forms) that includes "pinch to zoom" and "swipe to dismiss" gestures.

NuGet

Supports Android and iOS.

Features

  • Pinch to zoom.
  • Swipe to dismiss.
  • Custom Title.
  • Custom Action Button.

Screen-Shots

PhotoBrowser for Android PhotoBrowser for iOS

Setup

  • Install the nuget package in portable and all platform specific projects.

Android

In MainActivity.cs file

    Stormlion.PhotoBrowser.Droid.Platform.Init(this);

iOS

In AppDelegate.cs file

    Stormlion.PhotoBrowser.iOS.Platform.Init();

Usage

    new PhotoBrowser
    {
        Photos = new List<Photo>
        {
            new Photo
            {
                URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Vincent.jpg",
                Title = "Vincent"
            },
            new Photo
            {
                URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Jules.jpg",
                Title = "Jules"
            },
            new Photo
            {
                URL = "https://raw.githubusercontent.com/stfalcon-studio/FrescoImageViewer/v.0.5.0/images/posters/Korben.jpg",
                Title = "Korben"
            }
        },
        ActionButtonPressed = (index) =>
        {
            Debug.WriteLine($"Clicked {index}");
        },
		
		BackgroundColor = Color.White,
		DidDisplayPhoto = (index) =>
		{
			Debug.WriteLine($"Selection changed: {index}");
		},

		Android_ContainerPaddingPx = 20,
		iOS_ZoomPhotosToFill = false		
    }.Show();

More Properties

  • ActionButtonPressed
  • StartIndex

Contributions

Contributions are welcome!

photobrowser.forms's People

Contributors

didacvm avatar leojharris avatar stormlion227 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

photobrowser.forms's Issues

No ability to use local images

It seems I'm unable to use local images instead of web images, it only accepts absolute web path and I can't find any way to view Images stored in my project

Update to Nuget.org

Hi,
I saw in closed issues the problem with the Rg.Plugin.Popup in iOS has been merged on March of 2019, but in Nuget.org the last version of this plugin is from January of 2019. Can you will update please?

Regards!

Error Android 9.0

System.MissingMethodException: Default constructor not found for type Stormlion.PhotoBrowser.Droid.PhotoBrowserImplementation

view.FindViewById is null

in file Stormlion.PhotoBrowser.Droid.ImageOverlayView

tvDescription = view.FindViewById<TextView>(Resource.Id.tvDescription); btnAction = view.FindViewById<ImageButton>(Resource.Id.btnShare);

tvDescription , btnAction is null , so it break when run here .

i down the source and add null check , then buid to my project .

Show wait loader(spinner)in Android

I am able to successfully implement this library(plugin) into my project and it is working great.
However I get a black blank screen before the images are actually rendered in Android. In iOS there is a default wait loader which is shown till the image is displayed.
How can I implement a similar wait loader(spinner) in Android?Please help.

Upadte Project!

Could you update your project for new Xamarin.Forms version and release new version?

Thanks in Advance.

Not compatible with X.F. 5.0+ on Android

So far 0.1.4 version of this plugin isn't compatible with Xamarin Forms 5.0+. on Android devices because its referencing the Xamarin.Android.Support.Core.UI library which isn't longer supported.
Are you planning on updating the plugin? Its a great plugin, it would be a pity to leave it behind.

For googlers.. The error code states:
Can not resolve reference: Xamarin.Android.Support.Core.UI, referenced by Stormlion.FrescoImageViewer. Please add a NuGet package or assembly reference for Xamarin.Android.Support.Core.UI, or remove the reference to Stormlion.FrescoImageViewer.

Change Back Button Icon for Android and iOS

I am able to successfully implement this library(plugin) into my project and it is working great.
However I want to change the back button icon to my own icon.How can I do this?
How to change the Action button icon in both Android and iOS?

MMVM Use

Hi,

How can I use mvvm design pattern (like prism.forms)?

Thanks.

Enable native share[enhancement]

Fresco has native implementation to share(native), would be a very useful enable this. But, need check out the iOS implementation already has this amazing feature waiting to be enabled also.

Option Android_ContainerPaddingPx missing?

Hello,
I follow the example and I got it to work with no issue on android so far.
However I had to removed two options:

    • Android_ContainerPaddingPx = 20,
    • iOS_ZoomPhotosToFill = false

I get : Photo-browser does not contain definition for Android_ContainerPaddingPx AND
Photo-browser does not contain definition for iOS_ZoomPhotosToFill

Compability with Rg.Plugins.Popup

Hello, the plugin is excellent and my app do enjoy the convenience on all your hard effort.
This issue might be out of the scope, however I found that if I try to view the PhotoBrowser inside the pop up screen, nothing happened on iOS but works on android. I'm beginner of iOS developer but i suspect there might be something related to the code below in MyMWPhotoBrowser:
UIApplication.SharedApplication.KeyWindow.RootViewController.PresentViewController(new UINavigationController(browser), true, null);

Any idea to work with it? Thanks!

https://github.com/rotorgames/Rg.Plugins.Popup

Share Plugin of Xamarin Forms does not work

Hi ,

First of all great Plugin.
I am using this plugin in multiple apps I am trying to use Xamarin Forms Share Plugin to share the image through the ActionButtonPressed event but nothing happen.

I got the break point but sharing does not work.

How to add long press or tap gesture on photos

Hi, thanks for the plugin. It works great.
I want to add long press or tap gesture on photos, it seems I can't add GestureRecognizers directly on PhotoBrowser. Is there anybody who know how to achieve this or any clue? Thanks.

Missing Properties

Hi,

Just to let you know these properties:
BackgroundColor, DidDisplayPhoto, Android_ContainerPaddingPx , iOS_ZoomPhotosToFill

are not available in latest nuget package published.

Cheers.

Using local images

How can I use local images?

Code snippet:
new Photo
{
URL = "music.jpg",
Title = "Korben"
},

Modal Page on IOS

Thanks for the plugin it's working great for me except for modal view on IOS the browser is not showing at all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.