-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.) UWP download location fixed. 2.) BadgeLogo fixed. 3.) Added references for Ads in UWP project. (Doesn't work tho). Know Issues : Setting up AdControlView in UWP throws `System.InvalidOperationException: 'Cannot assign a native control without an Element; Renderer unbound and/or disposed. Please consult Xamarin.Forms renderers for reference implementation of OnElementChanged.'`. Need to fix that.
- Loading branch information
Showing
21 changed files
with
143 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,10 @@ | ||
- Initial Code Commit For CoManga [2019.03.05] | ||
- Added download location for UWP [2019.03.11] | ||
- Initial Code Commit For CoManga. [2019.03.05] | ||
- Added download location for UWP. [2019.03.11] | ||
- UWP download location fixed. [2019.03.24] | ||
- BadgeLogo fixed. [2019.03.24] | ||
- Added references for Ads in UWP project. (Doesn't work tho). [2019.03.24] | ||
|
||
Know Issues : | ||
Setting up AdControlView in UWP throws `System.InvalidOperationException: 'Cannot assign a native control without an Element; Renderer unbound and/or disposed. Please consult Xamarin.Forms renderers for reference implementation of OnElementChanged.'`. | ||
|
||
Need to fix that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,12 @@ | ||
- Initial Code Commit For CoManga [2019.03.05] | ||
- Added download location for UWP [2019.03.11] | ||
- Initial Code Commit For CoManga. [2019.03.05] | ||
- Added download location for UWP. [2019.03.11] | ||
- UWP download location fixed. [2019.03.24] | ||
- BadgeLogo fixed. [2019.03.24] | ||
- Added references for Ads in UWP project. (Doesn't work tho). [2019.03.24] | ||
|
||
Know Issues : | ||
Setting up AdControlView in UWP throws `System.InvalidOperationException: 'Cannot assign a native control without an Element; Renderer unbound and/or disposed. Please consult Xamarin.Forms renderers for reference implementation of OnElementChanged.'`. | ||
|
||
Need to fix that. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/comic_dl/comic_dl.UWP/customRenderer/AdViewRenderer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
using Xamarin.Forms; | ||
using Xamarin.Forms.Platform.UWP; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using Microsoft.Advertising.Ads; | ||
using Microsoft.Advertising.WinRT.UI; | ||
using Windows.System.Profile; | ||
|
||
[assembly: ExportRenderer(typeof(comic_dl.Controls.AdControlView), typeof(comic_dl.UWP.customRenderer.AdViewRenderer))] | ||
namespace comic_dl.UWP.customRenderer | ||
{ | ||
#pragma warning disable CS0618 // Type or member is obsolete | ||
public class AdViewRenderer : ViewRenderer<Controls.AdControlView, AdControl> | ||
{ | ||
string bannerId = "1100041955"; | ||
AdControl adView; | ||
string applicationID = "9n81f8b5ww93"; | ||
void CreateNativeAdControl() | ||
{ | ||
if (adView != null) | ||
return; | ||
|
||
var width = 300; | ||
var height = 50; | ||
if (AnalyticsInfo.VersionInfo.DeviceFamily == "Windows.Desktop") | ||
{ | ||
width = 728; | ||
height = 90; | ||
} | ||
// Setup your BannerView, review AdSizeCons class for more Ad sizes. | ||
adView = new AdControl | ||
{ | ||
ApplicationId = applicationID, | ||
AdUnitId = bannerId, | ||
HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Center, | ||
VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Bottom, | ||
Height = height, | ||
Width = width | ||
}; | ||
|
||
} | ||
|
||
protected override void OnElementChanged(ElementChangedEventArgs<Controls.AdControlView> e) | ||
{ | ||
base.OnElementChanged(e); | ||
if (Control == null) | ||
{ | ||
CreateNativeAdControl(); | ||
//SetNativeControl(adView); | ||
} | ||
} | ||
} | ||
#pragma warning restore CS0618 // Type or member is obsolete | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters