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" ?> | |
| <paths xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <external-path name="my_images" path="Android/data/com.yourcompany.appname/files/Pictures" /> | |
| </paths> |
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
| protected override void OnActivityResult(int requestCode, Result resultCode, Intent data) | |
| { | |
| base.OnActivityResult(requestCode, resultCode, data); | |
| //Camera Request | |
| if (requestCode == 0) | |
| { | |
| if (resultCode == Result.Ok) | |
| { | |
| Task.Run(() => |
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 enum FileFormatEnum | |
| { | |
| PNG, | |
| JPEG | |
| } | |
| public void BringUpCamera(string imageId, FileFormatEnum fileType) | |
| { | |
| var intent = new Intent(MediaStore.ActionImageCapture); |
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
| <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.yourcompany.appname.fileprovider" android:exported="false" android:grantUriPermissions="true"> | |
| <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths"></meta-data> | |
| </provider> |
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
| iOSDevice iosDevice = new iOSDevice(); | |
| App.onIphoneX = iosDevice.deviceHasNotch(); |
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 System; | |
| using System.Collections.Generic; | |
| using System.Runtime.InteropServices; | |
| using Foundation; | |
| public class iOSDevice | |
| { | |
| List<string> iphonesWithNotch = new List<string>(); | |
| public iOSDevice() |
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 GradientTestPage() | |
| { | |
| InitializeComponent(); | |
| Color[] gradientColors = new Color[] { Color.Black, Color.Orange, Color.Black }; | |
| GradientModel g = new GradientModel() | |
| { | |
| GradientColors = gradientColors, | |
| ViewWidth = 300, |
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 void CreateGradient() | |
| { | |
| CAGradientLayer gradient = new CAGradientLayer(); | |
| CGRect tempRect = new CGRect(0, 0, this.viewWidth, this.viewHeight); | |
| gradient.Frame = tempRect; | |
| //Need to convert the colors to CGColor objects | |
| CGColor[] cgColors = new CGColor[gradientColors.Count()]; | |
| for (int i = 0; i < gradientColors.Count(); i++) |
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 void CreateGradient() | |
| { | |
| //Need to convert the colors to Android Color objects | |
| int[] androidColors = new int[gradientColors.Count()]; | |
| for (int i = 0; i < gradientColors.Count(); i++) | |
| { | |
| Xamarin.Forms.Color temp = gradientColors[i]; | |
| androidColors[i] = temp.ToAndroid(); | |
| } |
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 GradientViewRender : View | |
| { | |
| public static readonly BindableProperty GradientColorsProperty = BindableProperty.Create<GradientViewRender, Color[]>(p => p.GradientColors, new Color[]{Color.White} ); | |
| public Color[] GradientColors | |
| { | |
| get { return (Color[])base.GetValue(GradientColorsProperty); } | |
| set { base.SetValue(GradientColorsProperty, value); } | |
| } |
NewerOlder