Skip to content

Commit

Permalink
Merge pull request #90 from xabre/androidx-xf45
Browse files Browse the repository at this point in the history
AndroidX and XF45
  • Loading branch information
xabre authored Jun 14, 2020
2 parents f60b978 + 759ebb3 commit dccdcb7
Show file tree
Hide file tree
Showing 31 changed files with 62 additions and 71 deletions.
24 changes: 14 additions & 10 deletions .build/Plugin.Badge.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>Plugin.Badge</id>
<version>2.2.1</version>
<version>2.3.0</version>
<title>Tab Badge for Xamarin.Forms</title>
<authors>Adrian Seceleanu</authors>
<owners>Adrian Seceleanu</owners>
Expand All @@ -14,6 +14,10 @@
<tags>xamarin xamarin.forms badge tab tabbar monodroid Xamarin.iOS uwp uap android ios windows universal mac macos osx</tags>
<iconUrl>https://raw.githubusercontent.com/xabre/xamarin-forms-tab-badge/master/icon_small.png</iconUrl>
<releaseNotes>
[2.3.0-pre.2]
- #87: Update XF version in nuspec
[2.3.0-pre.1]
- #87: Updated to XF 4.5.0.356 and AndroidX. Target Android 10
[2.2.1]
- #74: Fix NRE in UpdateBadgeProperties
[2.2.0]
Expand Down Expand Up @@ -48,25 +52,25 @@
</releaseNotes>
<dependencies>
<group targetFramework="netstandard1.4">
<dependency id="Xamarin.Forms" version="4.0.0.425677" />
<dependency id="Xamarin.Forms" version="4.5.0.356" />
</group>
<group targetFramework="portable-net45+win+wpa81+wp80">
<dependency id="Xamarin.Forms" version="4.0.0.425677" />
<dependency id="Xamarin.Forms" version="4.5.0.356" />
</group>
<group targetFramework="MonoAndroid10">
<dependency id="Xamarin.Forms" version="4.0.0.425677" />
<dependency id="Xamarin.Forms" version="4.5.0.356" />
</group>
<group targetFramework="Xamarin.iOS10">
<dependency id="Xamarin.Forms" version="4.0.0.425677" />
<dependency id="Xamarin.Forms" version="4.5.0.356" />
</group>
<group targetFramework="uap10.0">
<dependency id="Xamarin.Forms" version="4.0.0.425677" />
<dependency id="Xamarin.Forms" version="4.5.0.356" />
</group>
<group targetFramework="xamarinmac20">
<dependency id="Xamarin.Forms" version="4.0.0.425677" />
<dependency id="Xamarin.Forms" version="4.5.0.356" />
</group>
<group targetFramework="net45">
<dependency id="Xamarin.Forms" version="4.0.0.425677" />
<dependency id="Xamarin.Forms" version="4.5.0.356" />
</group>
</dependencies>
</metadata>
Expand All @@ -81,8 +85,8 @@
<file src="out\lib\ios\Plugin.Badge.*" target="lib\Xamarin.iOS10" />
<!-- uap -->
<file src="out\lib\uwp\Plugin.Badge.UWP\Plugin.Badge.*" target="lib\uap10.0" />
<file src="..\Source\Plugin.Badge.UWP\bin\Release\HeaderTemplate.xbf" target="lib\uap10.0\Plugin.Badge.UWP" />
<file src="..\Source\Plugin.Badge.UWP\bin\Release\Plugin.Badge.UWP.xr.xml" target="lib\uap10.0\Plugin.Badge.UWP" />
<file src="..\Source\Plugin.Badge.UWP\bin\Release\**\HeaderTemplate.*" target="lib\uap10.0\Plugin.Badge.UWP" />
<file src="..\Source\Plugin.Badge.UWP\bin\Release\**\Plugin.Badge.UWP.xr.xml" target="lib\uap10.0\Plugin.Badge.UWP" />
<!-- mac -->
<file src="out\lib\mac\Plugin.Badge.*" target="lib\xamarinmac20" />
<!-- wpf -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="4.0.0.425677" />
<PackageReference Include="Xamarin.Forms" Version="4.5.0.356" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion Source/Plugin.Badge.Droid/BadgeView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Android.Views.Animations;
using Android.Widget;
using Android.Graphics.Drawables.Shapes;
using Android.Support.V4.View;
using AndroidX.Core.View;
using Plugin.Badge.Abstractions;

namespace Plugin.Badge.Droid
Expand Down
7 changes: 4 additions & 3 deletions Source/Plugin.Badge.Droid/BadgedTabbedPageRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Threading.Tasks;
using Xamarin.Forms.Platform.Android.AppCompat;
using Xamarin.Forms;
using Android.Support.Design.Widget;
using Android.Views;
using Android.Widget;
using Xamarin.Forms.Platform.Android;
Expand All @@ -12,12 +11,14 @@
using TabbedPage = Xamarin.Forms.TabbedPage;
using Plugin.Badge.Abstractions;
using System.Linq;
using Google.Android.Material.BottomNavigation;
using Google.Android.Material.Tabs;

namespace Plugin.Badge.Droid
{
public class BadgedTabbedPageRenderer : TabbedPageRenderer
{
private const int DeleayBeforeTabAdded = 10;
private const int DelayBeforeTabAdded = 50;
protected readonly Dictionary<Element, BadgeView> BadgeViews = new Dictionary<Element, BadgeView>();
private TabLayout _topTabLayout;
private LinearLayout _topTabStrip;
Expand Down Expand Up @@ -133,7 +134,7 @@ private void OnTabRemoved(object sender, ElementEventArgs e)

private async void OnTabAdded(object sender, ElementEventArgs e)
{
await Task.Delay(DeleayBeforeTabAdded);
await Task.Delay(DelayBeforeTabAdded);

if (!(e.Element is Page page))
return;
Expand Down
4 changes: 2 additions & 2 deletions Source/Plugin.Badge.Droid/Plugin.Badge.Droid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Plugin.Badge.Droid</RootNamespace>
<AssemblyName>Plugin.Badge.Droid</AssemblyName>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
Expand Down Expand Up @@ -65,7 +65,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion Source/Plugin.Badge.Droid/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("2.2.1")]
[assembly: AssemblyVersion("2.3.0")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
2 changes: 1 addition & 1 deletion Source/Plugin.Badge.Mac/Plugin.Badge.Mac.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion Source/Plugin.Badge.Mac/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("2.2.1")]
[assembly: AssemblyVersion("2.3.0")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
Expand Down Expand Up @@ -112,7 +112,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="Plugin.Badge.Sample.Droid.Legacy.Plugin.Badge.Sample.Droid.Legacy" android:versionCode="1" android:versionName="1.0">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="28" />
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="29" />
<application android:allowBackup="true" android:label="@string/app_name"></application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("2.2.1")]
[assembly: AssemblyVersion("2.2.1")]
// [assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyFileVersion("2.2.0")]

//register renderer
Expand Down
4 changes: 2 additions & 2 deletions Source/Plugin.Badge.UWP/Plugin.Badge.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>Plugin.Badge.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.16299.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -145,7 +145,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
4 changes: 2 additions & 2 deletions Source/Plugin.Badge.UWP/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("2.2.1")]
[assembly: AssemblyVersion("2.2.1")]
// [assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyFileVersion("2.2.0")]
[assembly: ComVisible(false)]
4 changes: 2 additions & 2 deletions Source/Plugin.Badge.WPF/Plugin.Badge.WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.Platform.WPF">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
4 changes: 2 additions & 2 deletions Source/Plugin.Badge.WPF/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("2.2.1")]
[assembly: AssemblyVersion("2.2.1")]
// [assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyFileVersion("2.2.0")]
18 changes: 2 additions & 16 deletions Source/Plugin.Badge.WPF/TabItemTemplate.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,20 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ComponentModel;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Plugin.Badge.Abstractions;
using Xamarin.Forms;
using Page = Xamarin.Forms.Page;

namespace Plugin.Badge.WPF
Expand Down Expand Up @@ -50,7 +36,7 @@ private void OnDataContextChanged(object sender, DependencyPropertyChangedEventA
if (this.DataContext is Page page)
{
_tab = page.GetPageWithBadge();
_tab.PropertyChanged -= BindableObjectOnPropertyChanged;
_tab.PropertyChanged += BindableObjectOnPropertyChanged;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Source/Plugin.Badge.iOS/Plugin.Badge.iOS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
Expand Down
2 changes: 1 addition & 1 deletion Source/Plugin.Badge.iOS/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("2.2.1")]
[assembly: AssemblyVersion("2.3.0")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<RootNamespace>Plugin.Badge.Sample.Droid</RootNamespace>
<AssemblyName>Plugin.Badge.Sample.Droid</AssemblyName>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
Expand Down Expand Up @@ -95,10 +95,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<Import Project="..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets" Condition="Exists('..\packages\Xamarin.Android.Support.Vector.Drawable.23.3.0\build\Xamarin.Android.Support.Vector.Drawable.targets')" />
<Import Project="..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets" Condition="Exists('..\packages\Xamarin.Forms.2.3.2.127\build\portable-win+net45+wp80+win81+wpa81+MonoAndroid10+MonoTouch10+Xamarin.iOS10\Xamarin.Forms.targets')" />
</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.testapp.plugin_badge_sample">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.testapp.plugin_badge_sample" android:installLocation="auto">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="29" />
<application android:label="Plugin.Badge.Sample"></application>
</manifest>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("2.2.1")]
[assembly: AssemblyVersion("2.3.0")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>Plugin.Badge.Sample.UWP</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.16299.0</TargetPlatformVersion>
<TargetPlatformVersion Condition=" '$(TargetPlatformVersion)' == '' ">10.0.17763.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
Expand Down Expand Up @@ -140,7 +140,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("2.2.1")]
[assembly: AssemblyVersion("2.2.1")]
// [assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyFileVersion("2.2.0")]
[assembly: ComVisible(false)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
<PackageReference Include="Xamarin.Forms.Platform.WPF">
<Version>4.0.0.425677</Version>
<Version>4.5.0.356</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("2.2.1")]
[assembly: AssemblyVersion("2.2.1")]
// [assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyVersion("2.3.0")]
[assembly: AssemblyFileVersion("2.2.0")]

//register renderer
Expand Down
Loading

0 comments on commit dccdcb7

Please sign in to comment.