This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-tizen-platform-renderer
- Loading branch information
Showing
128 changed files
with
2,361 additions
and
540 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
18 changes: 18 additions & 0 deletions
18
Xamarin.Forms.Build.Tasks/CompiledMarkupExtensions/NullExtension.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,18 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using Mono.Cecil; | ||
using Mono.Cecil.Cil; | ||
using Xamarin.Forms.Xaml; | ||
|
||
namespace Xamarin.Forms.Build.Tasks | ||
{ | ||
class NullExtension : ICompiledMarkupExtension | ||
{ | ||
|
||
public IEnumerable<Instruction> ProvideValue(IElementNode node, ModuleDefinition module, ILContext context, out TypeReference typeRef) | ||
{ | ||
typeRef = module.TypeSystem.Object; | ||
return new[] { Instruction.Create(OpCodes.Ldnull) }; | ||
} | ||
} | ||
} |
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
38 changes: 38 additions & 0 deletions
38
Xamarin.Forms.ControlGallery.Android/Resources/drawable/cartman.xml
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,38 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:viewportWidth="104" | ||
android:viewportHeight="97" | ||
android:width="104dp" | ||
android:height="97dp"> | ||
<path | ||
android:pathData="M14 85l3 9 72 0c0 0 5 -9 4 -10 -2 -2 -79 0 -79 1" | ||
android:fillColor="#7c4e32" /> | ||
<path | ||
android:pathData="M19 47c0 0 -9 7 -13 14 -5 6 3 7 3 7l1 14c0 0 10 8 23 8 14 0 26 1 28 0 2 -1 9 -2 9 -4 1 -1 27 1 27 -9C97 67 104 57 86 48 69 39 19 47 19 47" | ||
android:fillColor="#e30000" /> | ||
<path | ||
android:pathData="M17 32C14 80 97 75 88 29L53 14" | ||
android:fillColor="#ffe1c4" /> | ||
<path | ||
android:pathData="M17 32C26 -4 78 0 88 29 68 20 48 20 17 32" | ||
android:fillColor="#8ed8f8" /> | ||
<path | ||
android:pathData="M54 35a10 8 60 1 1 0 0.1zm-17 3a10 8 -60 1 1 0 0.1z" | ||
android:fillColor="#ffffff" /> | ||
<path | ||
android:pathData="M41 6c1 -1 4 -3 8 -3 3 0 9 -1 14 3L62 8 60 8 58 8C58 8 55 9 53 8 51 7 52 7 52 7L49 8 47 7 46 7c0 0 -1 2 -3 2 0 0 -2 -1 -2 -3m-24 28l0 -2c0 0 35 -20 71 -3l0 2C88 31 53 14 17 34M5 62c3 -2 5 -2 8 0 3 2 13 6 8 11 -2 2 -6 0 -8 0 -1 1 -4 2 -6 1C3 71 1 66 5 62m94 -3c0 0 -9 -2 -11 4l-3 5c0 1 -2 3 3 3 5 0 5 2 7 2 3 0 7 -1 7 -4 0 -4 -1 -11 -3 -10" | ||
android:fillColor="#fff200" /> | ||
<path | ||
android:pathData="M56 78l0 1m-1 -10l0 1m0 17l0 1" | ||
android:strokeWidth="1" | ||
android:fillColor="#000000" | ||
android:strokeColor="#000000" | ||
android:strokeLineCap="round" /> | ||
<path | ||
android:pathData="M60 36a1 1 0 1 1 0 -0.1M49 36a1 1 0 1 1 0 -0.1M57 55a2 3 0 1 1 0 -0.1M12 94c0 0 20 -4 42 0 0 0 27 -4 39 0z" | ||
android:fillColor="#000000" /> | ||
<path | ||
android:pathData="M50 59c0 0 4 3 10 0m-4 7l2 12 -2 12M25 50c0 0 10 12 23 12 13 0 24 0 35 -15" | ||
android:strokeWidth="0.5" | ||
android:strokeColor="#000000" /> | ||
</vector> |
9 changes: 9 additions & 0 deletions
9
Xamarin.Forms.ControlGallery.Android/Resources/drawable/error.xml
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="356dp" | ||
android:height="508dp" | ||
android:viewportWidth="356" | ||
android:viewportHeight="508"> | ||
<path android:fillColor="#000000" android:pathData="M330.4 0H25.6C11.6 0 .2 11.4.2 25.4v457.2c0 14 11.4 25.4 25.4 25.4h304.8c14 0 25.4-11.4 25.4-25.4V25.4c0-14-11.4-25.4-25.4-25.4zM178 482.6c-14 0-25.4-11.4-25.4-25.4 0-14 11.4-25.4 25.4-25.4 14 0 25.4 11.4 25.4 25.4 0 14-11.4 25.4-25.4 25.4zm127-86.4c0 5.6-4.5 10.2-10.2 10.2H61.2c-5.6 0-10.2-4.6-10.2-10.2V61c0-5.6 4.5-10.2 10.2-10.2h233.7c5.6 0 10.2 4.6 10.2 10.2v335.2h-.1z"/> | ||
<path android:fillColor="#000000" android:pathData="M178 101.6c-14 0-25.4 11.4-25.4 25.4 0 14 11.4 25.4 25.4 25.4 14 0 25.4-11.4 25.4-25.4 0-14-11.4-25.4-25.4-25.4zM178 203.2c-14 0-25.4 11.4-25.4 25.4v101.6c0 14 11.4 25.4 25.4 25.4 14 0 25.4-11.4 25.4-25.4V228.6c0-14-11.4-25.4-25.4-25.4z"/> | ||
</vector> |
17 changes: 17 additions & 0 deletions
17
Xamarin.Forms.ControlGallery.Android/Resources/drawable/heart.xml
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,17 @@ | ||
<!-- res/drawable/heart.xml --> | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:height="256dp" | ||
android:width="256dp" | ||
android:viewportWidth="32" | ||
android:viewportHeight="32"> | ||
|
||
<!-- draw a path --> | ||
<path android:fillColor="#8fff" | ||
android:pathData="M20.5,9.5 | ||
c-1.955,0,-3.83,1.268,-4.5,3 | ||
c-0.67,-1.732,-2.547,-3,-4.5,-3 | ||
C8.957,9.5,7,11.432,7,14 | ||
c0,3.53,3.793,6.257,9,11.5 | ||
c5.207,-5.242,9,-7.97,9,-11.5 | ||
C25,11.432,23.043,9.5,20.5,9.5z" /> | ||
</vector> |
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
135 changes: 135 additions & 0 deletions
135
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla32865.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,135 @@ | ||
using System; | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
|
||
#if UITEST | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
#endif | ||
|
||
// Apply the default category of "Issues" to all of the tests in this assembly | ||
// We use this as a catch-all for tests which haven't been individually categorized | ||
#if UITEST | ||
[assembly: NUnit.Framework.Category("Issues")] | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Bugzilla, 32865, "On MasterDetailPage trying to change Icon of Master page doesn\'t work if another view is pushed and Image is renderer in blue", PlatformAffected.iOS)] | ||
public class Bugzilla32865 : TestMasterDetailPage // or TestMasterDetailPage, etc ... | ||
{ | ||
public static Bugzilla32865 Mdp; | ||
|
||
protected override void Init() | ||
{ | ||
Mdp = this; | ||
|
||
Master = new ContentPage {Title = "Master"}; | ||
Detail = new NavigationPage(new DetailView32865()); | ||
} | ||
|
||
public void ChangeIcon() | ||
{ | ||
Master.Icon = "settings"; | ||
} | ||
public void ChangeIcon2() | ||
{ | ||
Master.Icon = "menuIcon"; | ||
} | ||
} | ||
|
||
[Preserve(AllMembers = true)] | ||
public class DetailView32865 : ContentPage | ||
{ | ||
public DetailView32865() | ||
{ | ||
Title = "Page1"; | ||
|
||
var label = new Label | ||
{ | ||
Text = "Push a page and then change master icon. The icon should be changeable from any page on the navigation stack.", | ||
HorizontalTextAlignment = TextAlignment.Center, | ||
VerticalTextAlignment = TextAlignment.Center | ||
}; | ||
|
||
var button = new Button() | ||
{ | ||
Text = "Icon 1", | ||
}; | ||
button.Clicked += Button_Clicked; | ||
var button2 = new Button() | ||
{ | ||
Text = "Icon 2", | ||
}; | ||
button2.Clicked += Button2_Clicked; | ||
var button3 = new Button() | ||
{ | ||
Text = "Push Page", | ||
}; | ||
button3.Clicked += Button3_Clicked; | ||
|
||
var layout = new StackLayout() | ||
{ | ||
VerticalOptions = LayoutOptions.FillAndExpand, | ||
HorizontalOptions = LayoutOptions.FillAndExpand, | ||
Children = { label, button, button2, button3 }, | ||
}; | ||
Content = layout; | ||
} | ||
void Button3_Clicked(object sender, EventArgs e) | ||
{ | ||
Navigation.PushAsync(new DetailView232865()); | ||
} | ||
|
||
void Button_Clicked(object sender, EventArgs e) | ||
{ | ||
Bugzilla32865.Mdp.ChangeIcon(); | ||
} | ||
|
||
void Button2_Clicked(object sender, EventArgs e) | ||
{ | ||
Bugzilla32865.Mdp.ChangeIcon2(); | ||
} | ||
} | ||
|
||
[Preserve(AllMembers = true)] | ||
public class DetailView232865 : ContentPage | ||
{ | ||
public DetailView232865() | ||
{ | ||
Title = "Page2"; | ||
|
||
var button = new Button() | ||
{ | ||
Text = "Icon 1", | ||
}; | ||
button.Clicked += Button_Clicked; | ||
|
||
var button2 = new Button() | ||
{ | ||
Text = "Icon 2", | ||
}; | ||
button2.Clicked += Button2_Clicked; | ||
|
||
var layout = new StackLayout() | ||
{ | ||
VerticalOptions = LayoutOptions.FillAndExpand, | ||
HorizontalOptions = LayoutOptions.FillAndExpand, | ||
Children = { button, button2 }, | ||
}; | ||
|
||
Content = layout; | ||
} | ||
|
||
void Button_Clicked(object sender, EventArgs e) | ||
{ | ||
Bugzilla32865.Mdp.ChangeIcon(); | ||
} | ||
|
||
void Button2_Clicked(object sender, EventArgs e) | ||
{ | ||
Bugzilla32865.Mdp.ChangeIcon2(); | ||
} | ||
} | ||
} |
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
51 changes: 51 additions & 0 deletions
51
Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla41600.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,51 @@ | ||
using Xamarin.Forms.CustomAttributes; | ||
using Xamarin.Forms.Internals; | ||
using System.Collections.Generic; | ||
|
||
#if UITEST | ||
using Xamarin.UITest; | ||
using NUnit.Framework; | ||
#endif | ||
|
||
namespace Xamarin.Forms.Controls.Issues | ||
{ | ||
[Preserve(AllMembers = true)] | ||
[Issue(IssueTracker.Bugzilla, 41600, "[Android] Invalid item param value for ScrollTo throws an error", PlatformAffected.Android)] | ||
public class Bugzilla41600 : TestContentPage | ||
{ | ||
protected override void Init() | ||
{ | ||
var items = new List<string>(); | ||
for (var i = 0; i <= 30; i++) | ||
items.Add(i.ToString()); | ||
|
||
var listView = new ListView | ||
{ | ||
ItemsSource = items | ||
}; | ||
Content = new StackLayout | ||
{ | ||
Children = | ||
{ | ||
listView, | ||
new Button | ||
{ | ||
Text = "Click for ScrollTo (should do nothing)", | ||
Command = new Command(() => | ||
{ | ||
listView.ScrollTo("Hello", ScrollToPosition.Start, true); | ||
}) | ||
}, | ||
new Button | ||
{ | ||
Text = "Click for ScrollTo (should go to 15)", | ||
Command = new Command(() => | ||
{ | ||
listView.ScrollTo(items[15], ScrollToPosition.Start, false); | ||
}) | ||
} | ||
} | ||
}; | ||
} | ||
} | ||
} |
Oops, something went wrong.