This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<style name="Theme.Splash" parent="android:Theme"> | |
<item name="android:windowBackground">@drawable/screen</item> | |
<item name="android:windowNoTitle">true</item> | |
<item name="android:scaleType">fitXY</item> | |
</style> | |
<style name="MyTheme" parent="MyTheme.Base"> | |
</style> | |
<style name="MyTheme.Base" parent="Theme.AppCompat.Light.NoActionBar"> |
This file contains hidden or 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
using Xamarin.Forms; | |
using System; | |
using System.Windows.Input; | |
namespace YourNameSpace.UI.Controls | |
{ | |
public class CustomStackLayout : StackLayout | |
{ | |
public static BindableProperty CommandProperty = | |
BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(CustomStackLayout), default(ICommand)); |
This file contains hidden or 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
/build |
This file contains hidden or 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
public class DeviceInfo : IDeviceInfo | |
{ | |
public string GetUniqueIdentifier() | |
{ | |
return Android.Provider.Settings.Secure.GetString(Xamarin.Forms.Forms.Context.ContentResolver, | |
Android.Provider.Settings.Secure.AndroidId); | |
} | |
} |
This file contains hidden or 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
public interface IDeviceInfo | |
{ | |
string GetUniqueIdentifier(); | |
} |
This file contains hidden or 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
public class iOSDeviceInfo : IDeviceInfo | |
{ | |
public string GetUniqueIdentifier() | |
{ | |
return UIDevice.CurrentDevice.IdentifierForVendor.AsString(); | |
} | |
} |
This file contains hidden or 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
public class AndroidDeviceInfo : IDeviceInfo | |
{ | |
public string GetUniqueIdentifier() | |
{ | |
return Android.Provider.Settings.Secure.GetString(Xamarin.Forms.Forms.Context.ContentResolver, | |
Android.Provider.Settings.Secure.AndroidId); | |
} | |
} |
This file contains hidden or 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
public class UwpDeviceInfo : IDeviceInfo | |
{ | |
public string GetUniqueIdentifier() | |
{ | |
var token = HardwareIdentification.GetPackageSpecificToken(null); | |
var hardwareId = token.Id; | |
var dataReader = Windows.Storage.Streams.DataReader.FromBuffer(hardwareId); | |
byte[] bytes = new byte[hardwareId.Length]; | |
dataReader.ReadBytes(bytes); |
This file contains hidden or 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
[assembly: Xamarin.Forms.Dependency(typeof(iOSDeviceInfo))] | |
namespace Mobile.Platform | |
{ | |
... | |
} |
OlderNewer