Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Samples/Forms/Core/FormsSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.3.4.270" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions Samples/Forms/Droid/FormsSample.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@
<AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Android.Support.v4" Version="25.4.0.2" />
<PackageReference Include="Xamarin.Android.Support.v4" Version="25.4.0.2" />
<PackageReference Include="FastAndroidCamera" Version="2.0.0" />
<PackageReference Include="Xamarin.Forms" Version="2.4.0.18342" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Samples/Forms/WindowsUniversal/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Microsoft.ApplicationInsights.PersistenceChannel": "1.2.3",
"Microsoft.ApplicationInsights.WindowsApps": "1.1.1",
"Microsoft.NETCore.UniversalWindowsPlatform": "6.0.1",
"Xamarin.Forms": "2.4.0.18342"
"Xamarin.Forms": "2.5.0.280555"
},
"frameworks": {
"uap10.0": {}
Expand Down
2 changes: 1 addition & 1 deletion Samples/Forms/iOS/FormsSample.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,6 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.TestCloud.Agent" Version="0.21.1" />
<PackageReference Include="Xamarin.Forms" Version="2.4.0.18342" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,6 @@
<ItemGroup>
<PackageReference Include="Xamarin.Android.Support.v4" Version="23.3.0" />
<PackageReference Include="FastAndroidCamera" Version="2.0.0" />
<PackageReference Include="Xamarin.Forms" Version="2.3.4.270" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>
</Project>
18 changes: 8 additions & 10 deletions Source/ZXing.Net.Mobile.Forms.Android/ZXingScannerViewRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ namespace ZXing.Net.Mobile.Forms.Android
public class ZXingScannerViewRenderer : ViewRenderer<ZXingScannerView, ZXing.Mobile.ZXingSurfaceView>
{
private Context appContext;
public ZXingScannerViewRenderer() { }
public ZXingScannerViewRenderer() : base () { }
public ZXingScannerViewRenderer(IntPtr a, JniHandleOwnership b) { }
public ZXingScannerViewRenderer(Context context)
public ZXingScannerViewRenderer(Context context) : base (context)
{
appContext = context;
}
//public ZXingScannerViewRenderer () : base ()
//{
//}

public static void Init ()
{
Expand All @@ -40,7 +37,6 @@ public static void Init ()
protected ZXingScannerView formsView;

protected ZXingSurfaceView zxingSurface;
internal Task<bool> requestPermissionsTask;

protected override async void OnElementChanged(ElementChangedEventArgs<ZXingScannerView> e)
{
Expand All @@ -64,14 +60,16 @@ protected override async void OnElementChanged(ElementChangedEventArgs<ZXingScan

if (activity != null)
await ZXing.Net.Mobile.Android.PermissionsHandler.RequestPermissionsAsync (activity);

zxingSurface = new ZXingSurfaceView (appContext, formsView.Options);
zxingSurface.LayoutParameters = new LayoutParams (LayoutParams.MatchParent, LayoutParams.MatchParent);

zxingSurface = new ZXingSurfaceView (appContext, formsView.Options)
{
LayoutParameters = new LayoutParams (LayoutParams.MatchParent, LayoutParams.MatchParent)
};

base.SetNativeControl (zxingSurface);

if (formsView.IsScanning)
zxingSurface.StartScanning(formsView.RaiseScanResult, formsView.Options);
zxingSurface.StartScanning (formsView.RaiseScanResult, formsView.Options);

if (!formsView.IsAnalyzing)
zxingSurface.PauseAnalysis ();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "6.0.1",
"Xamarin.Forms": "2.3.4.270"
"Xamarin.Forms": "2.5.0.280555"
},
"frameworks": {
"uap10.0": {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.3.4.270" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="2.3.4.270" />
<PackageReference Include="Xamarin.Forms" Version="2.5.0.280555" />
</ItemGroup>
</Project>