2021-01-08 1.JLCountryCode Android和iOS xamarin库。
| | |
| | | # Xcode |
| | | # |
| | | build/ |
| | | *.pbxuser |
| | | !default.pbxuser |
| | | *.mode1v3 |
| | | !default.mode1v3 |
| | | *.mode2v3 |
| | | !default.mode2v3 |
| | | *.perspectivev3 |
| | | !default.perspectivev3 |
| | | xcuserdata |
| | | *.xccheckout |
| | | *.moved-aside |
| | | DerivedData |
| | | *.hmap |
| | | *.ipa |
| | | *.xcuserstate |
| | | ## Ignore Visual Studio temporary files, build results, and |
| | | ## files generated by popular Visual Studio add-ons. |
| | | |
| | | # CocoaPods |
| | | # |
| | | # We recommend against adding the Pods directory to your .gitignore. However |
| | | # you should judge for yourself, the pros and cons are mentioned at: |
| | | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control |
| | | # |
| | | # Pods/ |
| | | # User-specific files |
| | | *.suo |
| | | *.user |
| | | *.sln.docstates |
| | | |
| | | # Build results |
| | | [Dd]ebug/ |
| | | [Dd]ebugPublic/ |
| | | [Rr]elease/ |
| | | [Rr]eleases/ |
| | | x64/ |
| | | build/ |
| | | bld/ |
| | | [Bb]in/ |
| | | [Oo]bj/ |
| | | .vs/ |
| | | .gitignore |
| | | packages/ |
| | | ZigBee.Ios/ |
| | | ZigBee.Droid/ |
| | | Shared.IOS/ |
| | | .DS_Store |
| | | .gitignore |
| | | |
| | | # Roslyn cache directories |
| | | *.ide/ |
| | | |
| | | # MSTest test Results |
| | | [Tt]est[Rr]esult*/ |
| | | [Bb]uild[Ll]og.* |
| | | |
| | | #NUNIT |
| | | *.VisualState.xml |
| | | TestResult.xml |
| | | |
| | | # Build Results of an ATL Project |
| | | [Dd]ebugPS/ |
| | | [Rr]eleasePS/ |
| | | dlldata.c |
| | | |
| | | *_i.c |
| | | *_p.c |
| | | *_i.h |
| | | *.ilk |
| | | *.meta |
| | | *.obj |
| | | *.pch |
| | | *.pdb |
| | | *.pgc |
| | | *.pgd |
| | | *.rsp |
| | | *.sbr |
| | | *.tlb |
| | | *.tli |
| | | *.tlh |
| | | *.tmp |
| | | *.tmp_proj |
| | | *.log |
| | | *.vspscc |
| | | *.vssscc |
| | | .builds |
| | | *.pidb |
| | | *.svclog |
| | | *.scc |
| | | |
| | | # Chutzpah Test files |
| | | _Chutzpah* |
| | | |
| | | # Visual C++ cache files |
| | | ipch/ |
| | | *.aps |
| | | *.ncb |
| | | *.opensdf |
| | | *.sdf |
| | | *.cachefile |
| | | |
| | | # Visual Studio profiler |
| | | *.psess |
| | | *.vsp |
| | | *.vspx |
| | | |
| | | # TFS 2012 Local Workspace |
| | | $tf/ |
| | | |
| | | # Guidance Automation Toolkit |
| | | *.gpState |
| | | |
| | | # ReSharper is a .NET coding add-in |
| | | _ReSharper*/ |
| | | *.[Rr]e[Ss]harper |
| | | *.DotSettings.user |
| | | |
| | | # JustCode is a .NET coding addin-in |
| | | .JustCode |
| | | |
| | | # TeamCity is a build add-in |
| | | _TeamCity* |
| | | |
| | | # DotCover is a Code Coverage Tool |
| | | *.dotCover |
| | | |
| | | # NCrunch |
| | | _NCrunch_* |
| | | .*crunch*.local.xml |
| | | |
| | | # MightyMoose |
| | | *.mm.* |
| | | AutoTest.Net/ |
| | | |
| | | # Web workbench (sass) |
| | | .sass-cache/ |
| | | |
| | | # Installshield output folder |
| | | [Ee]xpress/ |
| | | |
| | | # DocProject is a documentation generator add-in |
| | | DocProject/buildhelp/ |
| | | DocProject/Help/*.HxT |
| | | DocProject/Help/*.HxC |
| | | DocProject/Help/*.hhc |
| | | DocProject/Help/*.hhk |
| | | DocProject/Help/*.hhp |
| | | DocProject/Help/Html2 |
| | | DocProject/Help/html |
| | | |
| | | # Click-Once directory |
| | | publish/ |
| | | |
| | | # Publish Web Output |
| | | *.[Pp]ublish.xml |
| | | *.azurePubxml |
| | | ## TODO: Comment the next line if you want to checkin your |
| | | ## web deploy settings but do note that will include unencrypted |
| | | ## passwords |
| | | *.pubxml |
| | | |
| | | # NuGet Packages |
| | | packages/* |
| | | *.nupkg |
| | | ## TODO: If the tool you use requires repositories.config |
| | | ## uncomment the next line |
| | | #!packages/repositories.config |
| | | |
| | | # Enable "build/" folder in the NuGet Packages folder since |
| | | # NuGet packages use it for MSBuild targets. |
| | | # This line needs to be after the ignore of the build folder |
| | | # (and the packages folder if the line above has been uncommented) |
| | | !packages/build/ |
| | | |
| | | # Windows Azure Build Output |
| | | csx/ |
| | | *.build.csdef |
| | | |
| | | # Windows Store app package directory |
| | | AppPackages/ |
| | | |
| | | # Others |
| | | sql/ |
| | | *.Cache |
| | | ClientBin/ |
| | | [Ss]tyle[Cc]op.* |
| | | ~$* |
| | | *~ |
| | | *.dbmdl |
| | | *.dbproj.schemaview |
| | | *.pfx |
| | | *.publishsettings |
| | | node_modules/ |
| | | |
| | | # RIA/Silverlight projects |
| | | Generated_Code/ |
| | | |
| | | # Backup & report files from converting an old project file |
| | | # to a newer Visual Studio version. Backup files are not needed, |
| | | # because we have git ;-) |
| | | _UpgradeReport_Files/ |
| | | Backup*/ |
| | | UpgradeLog*.XML |
| | | UpgradeLog*.htm |
| | | |
| | | # SQL Server files |
| | | *.mdf |
| | | *.ldf |
| | | |
| | | # Business Intelligence projects |
| | | *.rdl.data |
| | | *.bim.layout |
| | | *.bim_*.settings |
| | | |
| | | # Microsoft Fakes |
| | | FakesAssemblies/ |
New file |
| | |
| | | using System; |
| | | using Android.Content; |
| | | using Com.Widget.Jlcountrycode; |
| | | |
| | | namespace Jlcountrycode |
| | | { |
| | | public class CountryCodeView |
| | | { |
| | | /// <summary> |
| | | /// 接口类的返回信息 |
| | | /// </summary> |
| | | private static CountryCodeView m_Current = null; |
| | | /// <summary> |
| | | /// 接口类的返回信息 |
| | | /// </summary> |
| | | public static CountryCodeView Current |
| | | { |
| | | get |
| | | { |
| | | if (m_Current == null) |
| | | { |
| | | m_Current = new CountryCodeView(); |
| | | } |
| | | return m_Current; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 国家区号选择 |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | public void Show(Action<string, string> action) |
| | | { |
| | | JLCountryCodeActivity.OnCountryCodeCallback = new OnCountryCodeCallback(action); |
| | | Shared.Application.Activity.StartActivity(new Intent(Shared.Application.Activity, typeof(JLCountryCodeActivity))); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// OnCountryCodeCallback |
| | | /// </summary> |
| | | public class OnCountryCodeCallback : Java.Lang.Object, Com.Widget.Jlcountrycode.Contact.IOnCountryCodeCallback |
| | | { |
| | | |
| | | Action<string, string> mAction; |
| | | public OnCountryCodeCallback(Action<string, string> action) |
| | | { |
| | | mAction = action; |
| | | } |
| | | |
| | | public void OnSelectCountryCallback(string countryName, string code) |
| | | { |
| | | mAction?.Invoke(countryName, code); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | Additions allow you to add arbitrary C# to the generated classes |
| | | before they are compiled. This can be helpful for providing convenience |
| | | methods or adding pure C# classes. |
| | | |
| | | == Adding Methods to Generated Classes == |
| | | |
| | | Let's say the library being bound has a Rectangle class with a constructor |
| | | that takes an x and y position, and a width and length size. It will look like |
| | | this: |
| | | |
| | | public partial class Rectangle |
| | | { |
| | | public Rectangle (int x, int y, int width, int height) |
| | | { |
| | | // JNI bindings |
| | | } |
| | | } |
| | | |
| | | Imagine we want to add a constructor to this class that takes a Point and |
| | | Size structure instead of 4 ints. We can add a new file called Rectangle.cs |
| | | with a partial class containing our new method: |
| | | |
| | | public partial class Rectangle |
| | | { |
| | | public Rectangle (Point location, Size size) : |
| | | this (location.X, location.Y, size.Width, size.Height) |
| | | { |
| | | } |
| | | } |
| | | |
| | | At compile time, the additions class will be added to the generated class |
| | | and the final assembly will a Rectangle class with both constructors. |
| | | |
| | | |
| | | == Adding C# Classes == |
| | | |
| | | Another thing that can be done is adding fully C# managed classes to the |
| | | generated library. In the above example, let's assume that there isn't a |
| | | Point class available in Java or our library. The one we create doesn't need |
| | | to interact with Java, so we'll create it like a normal class in C#. |
| | | |
| | | By adding a Point.cs file with this class, it will end up in the binding library: |
| | | |
| | | public class Point |
| | | { |
| | | public int X { get; set; } |
| | | public int Y { get; set; } |
| | | } |
New file |
| | |
| | | This directory is for Android .jars. |
| | | |
| | | There are 2 types of jars that are supported: |
| | | |
| | | == Input Jar == |
| | | |
| | | This is the jar that bindings should be generated for. |
| | | |
| | | For example, if you were binding the Google Maps library, this would |
| | | be Google's "maps.jar". |
| | | |
| | | Set the build action for these jars in the properties page to "InputJar". |
| | | |
| | | |
| | | == Reference Jars == |
| | | |
| | | These are jars that are referenced by the input jar. C# bindings will |
| | | not be created for these jars. These jars will be used to resolve |
| | | types used by the input jar. |
| | | |
| | | NOTE: Do not add "android.jar" as a reference jar. It will be added automatically |
| | | based on the Target Framework selected. |
| | | |
| | | Set the build action for these jars in the properties page to "ReferenceJar". |
New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | using Android.App; |
| | | |
| | | // General Information about an assembly is controlled through the following |
| | | // set of attributes. Change these attribute values to modify the information |
| | | // associated with an assembly. |
| | | [assembly: AssemblyTitle("Shared.Droid.JLCountryCode")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("Shared.Droid.JLCountryCode")] |
| | | [assembly: AssemblyCopyright("Copyright © 2020")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // Version information for an assembly consists of the following four values: |
| | | // |
| | | // Major Version |
| | | // Minor Version |
| | | // Build Number |
| | | // Revision |
| | | // |
| | | // You can specify all the values or you can default the Build and Revision Numbers |
| | | // by using the '*' as shown below: |
| | | // [assembly: AssemblyVersion("1.0.*")] |
| | | [assembly: AssemblyVersion("1.0.3.0")] |
| | | [assembly: AssemblyFileVersion("1.0.3.0")] |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProductVersion>8.0.30703</ProductVersion> |
| | | <SchemaVersion>2.0</SchemaVersion> |
| | | <ProjectGuid>{82A1E78A-69FA-4F09-98B8-EE4E57F57880}</ProjectGuid> |
| | | <ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
| | | <TemplateGuid>{77efb91c-a7e9-4b0e-a7c5-31eeec3c6d46}</TemplateGuid> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>Shared.Droid.JLCountryCode</RootNamespace> |
| | | <AssemblyName>Shared.Droid.JLCountryCode</AssemblyName> |
| | | <FileAlignment>512</FileAlignment> |
| | | <TargetFrameworkVersion>v8.0</TargetFrameworkVersion> |
| | | <AndroidClassParser>class-parse</AndroidClassParser> |
| | | <AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget> |
| | | <RestoreProjectStyle>PackageReference</RestoreProjectStyle> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="Mono.Android" /> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="Jars\AboutJars.txt" /> |
| | | <None Include="Additions\AboutAdditions.txt" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <TransformFile Include="Transforms\Metadata.xml" /> |
| | | <TransformFile Include="Transforms\EnumFields.xml" /> |
| | | <TransformFile Include="Transforms\EnumMethods.xml" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <LibraryProjectZip Include="Jars\JLCountryCode-V1.0.3.aar" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" /> |
| | | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
| | | Other similar extension points exist, see Microsoft.Common.targets. |
| | | <Target Name="BeforeBuild"> |
| | | </Target> |
| | | <Target Name="AfterBuild"> |
| | | </Target> |
| | | --> |
| | | </Project> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <enum-field-mappings> |
| | | <!-- |
| | | This example converts the constants Fragment_id, Fragment_name, |
| | | and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag |
| | | to an enum called Android.Support.V4.App.FragmentTagType with values |
| | | Id, Name, and Tag. |
| | | |
| | | <mapping jni-class="android/support/v4/app/FragmentActivity$FragmentTag" clr-enum-type="Android.Support.V4.App.FragmentTagType"> |
| | | <field jni-name="Fragment_name" clr-name="Name" value="0" /> |
| | | <field jni-name="Fragment_id" clr-name="Id" value="1" /> |
| | | <field jni-name="Fragment_tag" clr-name="Tag" value="2" /> |
| | | </mapping> |
| | | --> |
| | | </enum-field-mappings> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <enum-method-mappings> |
| | | <!-- |
| | | This example changes the Java method: |
| | | android.support.v4.app.Fragment.SavedState.writeToParcel (int flags) |
| | | to be: |
| | | android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags) |
| | | when bound in C#. |
| | | |
| | | <mapping jni-class="android/support/v4/app/Fragment.SavedState"> |
| | | <method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" /> |
| | | </mapping> |
| | | --> |
| | | </enum-method-mappings> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <metadata> |
| | | <!-- |
| | | This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask: |
| | | <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" /> |
| | | |
| | | This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground: |
| | | <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" /> |
| | | --> |
| | | <remove-node path="/api/package[@name='com.widget.jlcountrycode.contact']/class[@name='ContactItemComparator']" /> |
| | | <remove-node path="/api/package[@name='com.alibaba.fastjson']/class[@name='JSONObject']" /> |
| | | <remove-node path="/api/package[@name='com.alibaba.fastjson.util']/class[@name='FieldInfo']" /> |
| | | <remove-node path="/api/package[@name='com.alibaba.fastjson']/class[@name='JSONArray']" /> |
| | | <remove-node path="/api/package[@name='com.alibaba.fastjson.parser']/class[@name='JavaBeanDeserializer']" /> |
| | | <remove-node path="/api/package[@name='com.alibaba.fastjson.serializer']/class[@name='FieldSerializer']" /> |
| | | <!-- <remove-node />--> |
| | | </metadata> |
New file |
| | |
| | | Additions allow you to add arbitrary C# to the generated classes |
| | | before they are compiled. This can be helpful for providing convenience |
| | | methods or adding pure C# classes. |
| | | |
| | | == Adding Methods to Generated Classes == |
| | | |
| | | Let's say the library being bound has a Rectangle class with a constructor |
| | | that takes an x and y position, and a width and length size. It will look like |
| | | this: |
| | | |
| | | public partial class Rectangle |
| | | { |
| | | public Rectangle (int x, int y, int width, int height) |
| | | { |
| | | // JNI bindings |
| | | } |
| | | } |
| | | |
| | | Imagine we want to add a constructor to this class that takes a Point and |
| | | Size structure instead of 4 ints. We can add a new file called Rectangle.cs |
| | | with a partial class containing our new method: |
| | | |
| | | public partial class Rectangle |
| | | { |
| | | public Rectangle (Point location, Size size) : |
| | | this (location.X, location.Y, size.Width, size.Height) |
| | | { |
| | | } |
| | | } |
| | | |
| | | At compile time, the additions class will be added to the generated class |
| | | and the final assembly will a Rectangle class with both constructors. |
| | | |
| | | |
| | | == Adding C# Classes == |
| | | |
| | | Another thing that can be done is adding fully C# managed classes to the |
| | | generated library. In the above example, let's assume that there isn't a |
| | | Point class available in Java or our library. The one we create doesn't need |
| | | to interact with Java, so we'll create it like a normal class in C#. |
| | | |
| | | By adding a Point.cs file with this class, it will end up in the binding library: |
| | | |
| | | public class Point |
| | | { |
| | | public int X { get; set; } |
| | | public int Y { get; set; } |
| | | } |
New file |
| | |
| | | This directory is for Android .jars. |
| | | |
| | | There are 2 types of jars that are supported: |
| | | |
| | | == Input Jar == |
| | | |
| | | This is the jar that bindings should be generated for. |
| | | |
| | | For example, if you were binding the Google Maps library, this would |
| | | be Google's "maps.jar". |
| | | |
| | | Set the build action for these jars in the properties page to "InputJar". |
| | | |
| | | |
| | | == Reference Jars == |
| | | |
| | | These are jars that are referenced by the input jar. C# bindings will |
| | | not be created for these jars. These jars will be used to resolve |
| | | types used by the input jar. |
| | | |
| | | NOTE: Do not add "android.jar" as a reference jar. It will be added automatically |
| | | based on the Target Framework selected. |
| | | |
| | | Set the build action for these jars in the properties page to "ReferenceJar". |
New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | using System.Runtime.InteropServices; |
| | | using Android.App; |
| | | |
| | | // General Information about an assembly is controlled through the following |
| | | // set of attributes. Change these attribute values to modify the information |
| | | // associated with an assembly. |
| | | [assembly: AssemblyTitle("Shared.Droid.YCStatusBarLib")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("Shared.Droid.YCStatusBarLib")] |
| | | [assembly: AssemblyCopyright("Copyright © 2020")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | [assembly: ComVisible(false)] |
| | | |
| | | // Version information for an assembly consists of the following four values: |
| | | // |
| | | // Major Version |
| | | // Minor Version |
| | | // Build Number |
| | | // Revision |
| | | // |
| | | // You can specify all the values or you can default the Build and Revision Numbers |
| | | // by using the '*' as shown below: |
| | | // [assembly: AssemblyVersion("1.0.*")] |
| | | [assembly: AssemblyVersion("1.0.2.0")] |
| | | [assembly: AssemblyFileVersion("1.0.2.0")] |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProductVersion>8.0.30703</ProductVersion> |
| | | <SchemaVersion>2.0</SchemaVersion> |
| | | <ProjectGuid>{9893D262-A18D-4819-BDF2-ED81A85CD167}</ProjectGuid> |
| | | <ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
| | | <TemplateGuid>{77efb91c-a7e9-4b0e-a7c5-31eeec3c6d46}</TemplateGuid> |
| | | <OutputType>Library</OutputType> |
| | | <AppDesignerFolder>Properties</AppDesignerFolder> |
| | | <RootNamespace>Shared.Droid.YCStatusBarLib</RootNamespace> |
| | | <AssemblyName>Shared.Droid.YCStatusBarLib</AssemblyName> |
| | | <FileAlignment>512</FileAlignment> |
| | | <TargetFrameworkVersion>v8.0</TargetFrameworkVersion> |
| | | <AndroidClassParser>class-parse</AndroidClassParser> |
| | | <AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget> |
| | | <RestoreProjectStyle>PackageReference</RestoreProjectStyle> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug\</OutputPath> |
| | | <DefineConstants>DEBUG;TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugType>portable</DebugType> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release\</OutputPath> |
| | | <DefineConstants>TRACE</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="Mono.Android" /> |
| | | <Reference Include="System" /> |
| | | <Reference Include="System.Core" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <None Include="Jars\AboutJars.txt" /> |
| | | <None Include="Additions\AboutAdditions.txt" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <TransformFile Include="Transforms\Metadata.xml" /> |
| | | <TransformFile Include="Transforms\EnumFields.xml" /> |
| | | <TransformFile Include="Transforms\EnumMethods.xml" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <LibraryProjectZip Include="Jars\YCStatusBarLib-V1.0.1.aar" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" /> |
| | | <!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
| | | Other similar extension points exist, see Microsoft.Common.targets. |
| | | <Target Name="BeforeBuild"> |
| | | </Target> |
| | | <Target Name="AfterBuild"> |
| | | </Target> |
| | | --> |
| | | </Project> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <enum-field-mappings> |
| | | <!-- |
| | | This example converts the constants Fragment_id, Fragment_name, |
| | | and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag |
| | | to an enum called Android.Support.V4.App.FragmentTagType with values |
| | | Id, Name, and Tag. |
| | | |
| | | <mapping jni-class="android/support/v4/app/FragmentActivity$FragmentTag" clr-enum-type="Android.Support.V4.App.FragmentTagType"> |
| | | <field jni-name="Fragment_name" clr-name="Name" value="0" /> |
| | | <field jni-name="Fragment_id" clr-name="Id" value="1" /> |
| | | <field jni-name="Fragment_tag" clr-name="Tag" value="2" /> |
| | | </mapping> |
| | | --> |
| | | </enum-field-mappings> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <enum-method-mappings> |
| | | <!-- |
| | | This example changes the Java method: |
| | | android.support.v4.app.Fragment.SavedState.writeToParcel (int flags) |
| | | to be: |
| | | android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags) |
| | | when bound in C#. |
| | | |
| | | <mapping jni-class="android/support/v4/app/Fragment.SavedState"> |
| | | <method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" /> |
| | | </mapping> |
| | | --> |
| | | </enum-method-mappings> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <metadata> |
| | | <!-- |
| | | This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask: |
| | | <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" /> |
| | | |
| | | This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground: |
| | | <remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" /> |
| | | --> |
| | | </metadata> |
New file |
| | |
| | | using System; |
| | | |
| | | using ObjCRuntime; |
| | | using Foundation; |
| | | using UIKit; |
| | | |
| | | namespace Shared.IOS.JLCountryCode |
| | | { |
| | | // typedef void (^selectCountryCodeBlock)(NSString * _Nonnull, NSString * _Nonnull); |
| | | delegate void selectCountryCodeBlock(string countryName, string code); |
| | | |
| | | // @interface JLCountryCodeController : UIViewController |
| | | [BaseType(typeof(UIViewController))] |
| | | interface JLCountryCodeController |
| | | { |
| | | // @property (copy, nonatomic) selectCountryCodeBlock _Nonnull selectCountryCodeBlock; |
| | | [Export("selectCountryCodeBlock", ArgumentSemantic.Copy)] |
| | | selectCountryCodeBlock SelectCountryCodeBlock { get; set; } |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | using System.Reflection; |
| | | using System.Runtime.CompilerServices; |
| | | |
| | | using Foundation; |
| | | |
| | | // This attribute allows you to mark your assemblies as “safe to link”. |
| | | // When the attribute is present, the linker—if enabled—will process the assembly |
| | | // even if you’re using the “Link SDK assemblies only” option, which is the default for device builds. |
| | | |
| | | [assembly: LinkerSafe] |
| | | |
| | | // Information about this assembly is defined by the following attributes. |
| | | // Change them to the values specific to your project. |
| | | |
| | | [assembly: AssemblyTitle("Shared.IOS.JLCountryCode")] |
| | | [assembly: AssemblyDescription("")] |
| | | [assembly: AssemblyConfiguration("")] |
| | | [assembly: AssemblyCompany("")] |
| | | [assembly: AssemblyProduct("Shared.IOS.JLCountryCode")] |
| | | [assembly: AssemblyCopyright("Copyright © 2020")] |
| | | [assembly: AssemblyTrademark("")] |
| | | [assembly: AssemblyCulture("")] |
| | | |
| | | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". |
| | | // The form "{Major}.{Minor}.*" will automatically update the build and revision, |
| | | // and "{Major}.{Minor}.{Build}.*" will update just the revision. |
| | | |
| | | [assembly: AssemblyVersion("1.0.3")] |
| | | |
| | | // The following attributes are used to specify the signing key for the assembly, |
| | | // if desired. See the Mono documentation for more information about signing. |
| | | |
| | | //[assembly: AssemblyDelaySign(false)] |
| | | //[assembly: AssemblyKeyFile("")] |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| | | <PropertyGroup> |
| | | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
| | | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
| | | <ProjectTypeGuids>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
| | | <ProjectGuid>{CA72F24A-973D-4953-BB2C-C5BA130BF1C3}</ProjectGuid> |
| | | <TemplateGuid>{b6f3ff35-79b2-4f25-a2fc-60a7cf61013b}</TemplateGuid> |
| | | <OutputType>Library</OutputType> |
| | | <RootNamespace>Shared.IOS.JLCountryCode</RootNamespace> |
| | | <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> |
| | | <AssemblyName>Shared.IOS.JLCountryCode</AssemblyName> |
| | | <RestoreProjectStyle>PackageReference</RestoreProjectStyle> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>true</DebugSymbols> |
| | | <DebugType>full</DebugType> |
| | | <Optimize>false</Optimize> |
| | | <OutputPath>bin\Debug</OutputPath> |
| | | <DefineConstants>DEBUG;</DefineConstants> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <Optimize>true</Optimize> |
| | | <OutputPath>bin\Release</OutputPath> |
| | | <ErrorReport>prompt</ErrorReport> |
| | | <WarningLevel>4</WarningLevel> |
| | | <AllowUnsafeBlocks>true</AllowUnsafeBlocks> |
| | | </PropertyGroup> |
| | | <ItemGroup> |
| | | <Reference Include="System" /> |
| | | <Reference Include="Xamarin.iOS" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Folder Include="Resources\" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <Compile Include="Properties\AssemblyInfo.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ObjcBindingApiDefinition Include="ApiDefinition.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <ObjcBindingCoreSource Include="Structs.cs" /> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <NativeReference Include="Library\libJLCountryCode.a"> |
| | | <Kind>Static</Kind> |
| | | <SmartLink>False</SmartLink> |
| | | </NativeReference> |
| | | </ItemGroup> |
| | | <ItemGroup> |
| | | <BundleResource Include="Resources\countryCodeCH.plist" /> |
| | | <BundleResource Include="Resources\countryCodeEN.plist" /> |
| | | </ItemGroup> |
| | | <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" /> |
| | | </Project> |
New file |
| | |
| | |
|
| | | Microsoft Visual Studio Solution File, Format Version 12.00
|
| | | # Visual Studio 15
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.IOS.JLCountryCode", "Shared.IOS.JLCountryCode.csproj", "{CA72F24A-973D-4953-BB2C-C5BA130BF1C3}"
|
| | | EndProject
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.Droid.JLCountryCode", "..\Shared.Droid.JLCountryCode\Shared.Droid.JLCountryCode.csproj", "{82A1E78A-69FA-4F09-98B8-EE4E57F57880}"
|
| | | EndProject
|
| | | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared.Droid.YCStatusBarLib", "..\Shared.Droid.YCStatusBarLib\Shared.Droid.YCStatusBarLib.csproj", "{9893D262-A18D-4819-BDF2-ED81A85CD167}"
|
| | | EndProject
|
| | | Global
|
| | | GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
| | | Debug|Any CPU = Debug|Any CPU
|
| | | Release|Any CPU = Release|Any CPU
|
| | | EndGlobalSection
|
| | | GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
| | | {CA72F24A-973D-4953-BB2C-C5BA130BF1C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
| | | {CA72F24A-973D-4953-BB2C-C5BA130BF1C3}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
| | | {CA72F24A-973D-4953-BB2C-C5BA130BF1C3}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
| | | {CA72F24A-973D-4953-BB2C-C5BA130BF1C3}.Release|Any CPU.Build.0 = Release|Any CPU
|
| | | {82A1E78A-69FA-4F09-98B8-EE4E57F57880}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
| | | {82A1E78A-69FA-4F09-98B8-EE4E57F57880}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
| | | {82A1E78A-69FA-4F09-98B8-EE4E57F57880}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
| | | {82A1E78A-69FA-4F09-98B8-EE4E57F57880}.Release|Any CPU.Build.0 = Release|Any CPU
|
| | | {9893D262-A18D-4819-BDF2-ED81A85CD167}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
| | | {9893D262-A18D-4819-BDF2-ED81A85CD167}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
| | | {9893D262-A18D-4819-BDF2-ED81A85CD167}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
| | | {9893D262-A18D-4819-BDF2-ED81A85CD167}.Release|Any CPU.Build.0 = Release|Any CPU
|
| | | EndGlobalSection
|
| | | EndGlobal
|
New file |
| | |
| | | using System; |
| | | |
| | | namespace Shared.IOS.JLCountryCode |
| | | { |
| | | } |
| | | |
New file |
| | |
| | | using System; |
| | | using Shared.IOS.JLCountryCode; |
| | | |
| | | namespace Jlcountrycode |
| | | { |
| | | public class CountryCodeView |
| | | { |
| | | /// <summary> |
| | | /// 接口类的返回信息 |
| | | /// </summary> |
| | | private static CountryCodeView m_Current = null; |
| | | /// <summary> |
| | | /// 接口类的返回信息 |
| | | /// </summary> |
| | | public static CountryCodeView Current |
| | | { |
| | | get |
| | | { |
| | | if (m_Current == null) |
| | | { |
| | | m_Current = new CountryCodeView(); |
| | | } |
| | | return m_Current; |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 国家区号选择 |
| | | /// </summary> |
| | | /// <param name="action"></param> |
| | | public void Show(Action<string, string> action) |
| | | { |
| | | JLCountryCodeController mJLCountryCodeController = new JLCountryCodeController(); |
| | | |
| | | mJLCountryCodeController.SelectCountryCodeBlock += (countryName, code) => |
| | | { |
| | | action?.Invoke(countryName, code); |
| | | }; |
| | | |
| | | Shared.Application.currentVC.NavigationController.PushViewController(mJLCountryCodeController, true); |
| | | |
| | | } |
| | | } |
| | | } |