Граф коммитов

228 Коммитов

Автор SHA1 Сообщение Дата
Samantha Houts a542264a38
[Android] Fix WebView EnableZoomControls and DisplayZoomControls api (#6137)
* Add tests for #6132 and #6130

* [Android] Fix EnableZoomControl BP name and fix helper methods

fixes #6132
fixes #6130

* Update Xamarin.Forms.Controls.Issues.Shared.projitems
2019-05-09 11:00:14 -07:00
Shane Neuville a1431ed9da remove route params from shell (#6081)
* remove route params from shell

* Update Xamarin.Forms.Core.UnitTests/ShellTests.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>

* fix unit test
2019-05-08 16:15:43 -07:00
Shane Neuville 18dc4ec13d [Shell] Add Tab bar and auto promote tabs to nearest TabBar (#6023)
* add tab bar and promote implicit tabs to same tabbar

* - remove parent

* remove tab bar from flyout

* Update Xamarin.Forms.Core/Shell/ShellItemCollection.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>
2019-05-08 16:15:18 -07:00
Samantha Houts cf5cb580dc Merge branch '3.6.0' into 4.0.0 2019-04-29 16:42:15 -07:00
Shane Neuville 470f97bf18 fix global routes to push onto stack correctly (#6025)
fixes #6016
2019-04-29 16:40:11 -07:00
Matthew Leibowitz a8d0d7a1d4 [WIP] Unify the image handling (#4915)
* Initial code to get unifiied image handling
 - not yet tested
 - still using FileImageSource in some areas

* Updated the button renderers and added tests for Android

* Updated a few more of the Android renderers
 - also added an `IsEmpty` property to the ImageSource to indicate if this source actually contains data that can be used to try and load an image
 - added a few more "tests"
 - includes the changes for #4916

* A few more changes

* Keep the default page for the sample app

* Changing everything to ImageSource and going from there
 - Android, iOS, UWP and WPF are compiling
 - GTK, Mac and Tizen are not yet finished
 - Added a new interface for UWP to return an IconElement in addition to ImageSource (for app bar buttons)
 - not tested yet, nor are there any tests

* Renamed the property to be more useful

* All of Android is now async
 - still only minimal tests
 - also removed the bits that are in https://github.com/xamarin/Xamarin.Forms/pull/4948

* Update Xamarin.Forms.Platform.cs

* A few fixes to whitespace and nameof()

* Updated iOS and UWP wirth async image sources

* A few fixes and WPF support

* A few fixes for Android after the big merge

* Updated a few more loaders:
 - ios
 - macos
 - tizen
 - gtk

* Fix a few things after the merge

* - cast type to FileImageSource

* fix setting of title content if icon doesn't load

* fix IButtonLayoutManager to return correct control

* remove cast and add pack api

* - fix timing issues with layout/invalidation

* - remove aggresive element invalidations for now

* first set of api changes

* obsolete old apis and create new ones for ImageSource

* obsolete messages and static ordering fix

* add tests

* switch default on windows to show images on tabs

* - XStatic obsolete fix

* fix NPC test and bring back alert check on uwp

Fixes #3207
Fixes #4689
2019-04-26 13:46:13 -07:00
Shane Neuville 48606a5f1f
fix infinite loops and remove public apis (#5954)
* fix infinite loops and remove public apis

* - remove comments, fix location to not have implicit

* force uri to be relative on ios when no scheme specified

* address PR comments

* add error message

* reformat absolute uris

* additional suggestions

* Update Xamarin.Forms.Core/Shell/ShellNavigationState.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>

* Update Xamarin.Forms.Core/Shell/ShellUriHandler.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>

* Update Xamarin.Forms.Core/Shell/ShellUriHandler.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>

* Update Xamarin.Forms.Core/Shell/ShellUriHandler.cs

Co-Authored-By: PureWeen <shane94@hotmail.com>
2019-04-24 16:25:12 -06:00
Samantha Houts 77fda87ae0
Add unit tests for TabIndexExtensions (#5722)
* Add check to FindNextElement

* Add unit tests for TabIndexExtensions
2019-04-23 17:09:20 -07:00
Shane Neuville dbf4037a31 [Shell] Propagate Page bindings to TitleView and Shell Binding to Flyout (#5934) fixes #5650 fixes #5501
* propagate bindingcontext

* - add exception message and fix poorly named xaml file

* add ui test automation

* - fix unit test to represent new code

* - changed from ui test to unit test

* - propagate visual, parent, bc to titleview

* - style fixes
2019-04-18 16:25:31 +01:00
Shane Neuville 58662a10b4 [Shell] refactor of processing uris (#5852)
fixes #5790
2019-04-10 21:54:50 -07:00
Samantha Houts ca184714b4 Merge branch '3.6.0' into 4.0.0 2019-03-27 17:13:02 -07:00
Shane Neuville 421c4f21d7 [visual] Add extra parameter to android visual constructors (#5289)
* [visual] Add extra parameter to android visual constructors

* - add null check and constructor to Material Button Renderer to prove scenario
2019-03-27 16:10:21 -07:00
Rui Marinho 23b61a434b
Merge branch '3.6.0' into 4.0.0 2019-03-27 18:51:38 +00:00
E.Z. Hart f1297f93d5 Re-enable "Treat warnings as errors" (#5602)
* Enable "treat warnings as errors"

* Remove unnecessary for loop

* Remove properties which already exist in base class

* Make property hiding explicit and obsolete hiding property

* Move Treat Warnings as Errors setting to props file

* Fix weird quotation changes in Xamarin.Forms.Build.Tasks.csproj

* Scrub empty WarningsAsErrors tags

* Remove unused variable

* Fix TearDown method hiding in UI tests

* Fix Id member hiding in test for Bugzilla32871

* Fix RootPage member hiding in Bugzilla51503

* Fix RooPage member hiding in Issue1483

* Disable warnings for deprecated OpenGL calls

* Fix member hiding in test view models

* Fix RootPage member hiding in Issue1931

* Fix Id member hiding in Bugzilla42620

* Fix AutomationId member hiding in Bugzilla57114

* Fix Layout member hiding in Bugzilla40911

* Remove unused variables from Bugzilla31114

* Remove unused variable

* Fix various unused variable warnings

* Disable warning to leave example code for reference

* Fix unused variable from macOS test

* Remove unused members

* Fix unused variable warnings

* Fixed unused property warnings

* Fix warnings for unused code

* Disable 'await' warning

* Remove unused variable

* Adding pragma directives for await warnings

* Remove member hiding

* Turn off global "Treat warnings as errors" in other platforms

* Use MarkerId instead of obsolete Id member

* Fix await warnings in WPF GeocoderBackend

* Add missing await

* Disable warning for unused event
2019-03-27 18:38:38 +00:00
Shane Neuville 927c1058ae
[Android] Fix various issues with material found by a full run of the UI Tests with Material active (#5676)
* - locate activity

* get tests to run

* - fix and force core gallery to work against default

* - fix check if control already disposed

* - fixing what automationid assigns to

* - input transparent fixes

* - fix sandbox back

* - set default visual back to default

* Update Xamarin.Forms.Material.Android/MaterialStepperRenderer.cs

* Update Xamarin.Forms.Material.Android/MaterialSliderRenderer.cs

* - fix core gallery ui tests to find container

* - ui test tweak

* - fix background color on pickers

* - suggested changes

* - suggested fix
2019-03-27 10:07:15 -06:00
Chris van de Steeg de328b1338 Fix BindableLayout's incorrect layout.children.add -> use insert (#5582)
* Fix incorrect layout.children.add -> use insert

* Modify unit test to match the problem with this issue

- fixes #5579
2019-03-21 14:24:31 +01:00
spruceDevelopment 339bd2bc82 Correct Grid Height When Aspect Fit Image Gets Shrinked (#4990)
- fixes #4933

* Grid size incorrect when using with Image #4990 

* Unit Test for Grid size incorrect when using with Image #4933

* Grid size incorrect when using with Image #4933

* Unit Test for Grid size incorrect when using with Image #4933
2019-03-13 12:39:58 +01:00
ShaneN 24b4b554ad Merge branch '3.6.0' 2019-02-27 18:20:24 -07:00
Shane Neuville 2e6bc92583
[Visual] Visual tidy (#5356)
* [Visual] remove visual flag and tidy up code

* - added basic loading ui test

* change material namespaces to be Xamarin.Forms.Material.<Platform>

* api 19 fixes

* fix casing on resources
2019-02-27 16:48:45 -07:00
Stephane Delcroix 55937add66 Merge branch '3.6.0' 2019-02-26 20:12:27 +01:00
Jeremy Marcus 432adc624d Update BindableLayout.cs to fix #5213 (#5243)
- fixes #5213 

* Add Test for BindableLayout RemoveAll

* Update BindableLayout.cs to fix RemoveAll exception

* Missing using statements
2019-02-25 20:44:00 +01:00
Samantha Houts 4cfa82569d Merge branch '3.6.0' 2019-02-13 16:57:13 -08:00
Samantha Houts 3581e88f6c Merge branch '3.5.0' into 3.6.0 2019-02-13 16:55:00 -08:00
Andrei Nitescu b127bd1f93 Fixed passing container (#5158)
fixes #5156
2019-02-13 15:33:14 -08:00
Shane c1ae194404 Merge branch '3.5.0' into 3.6.0 2019-02-13 10:31:49 -05:00
E.Z. Hart c439585878 Reinstate and obsolete IPlatform, et al (#5181)
* Reanimate IPlatform and mark it obsolete

* Reinstate IPlatform everywhere in case someone is using it or subscribing to
PlatformSet

* Revert breaking parameter name change

* Obsolete IsEnabledPropertyName

* Reinstate and obsolete Realized property and constructor

* Escape string format so solution will build

* Fix previewer reflection test

* Fix interface on Tizen/TizenPlatformServices

* Update Xamarin.Forms.Core/Element.cs

Co-Authored-By: hartez <hartez@users.noreply.github.com>
2019-02-12 12:27:00 -08:00
Shane Neuville 30ae2a5368 Missing visual falling not falling back to registered default renderer (#5179) 2019-02-12 13:37:26 +00:00
Gerald Versluis 2c3df0ac0e [Enhancement] Android: WebView - Control over Zoom controls (#3607) fixes #1661
* Started implementation of zoom support on Android WebView

* Implemented fully working zoom and zoom controls for Android WebView

* Corrected merge error

* Removed redundant API checks

* Update Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/WebView.cs

Co-Authored-By: jfversluis <github@geraldversluis.nl>

* Update Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/WebView.cs

Co-Authored-By: jfversluis <github@geraldversluis.nl>

* Update Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/WebView.cs

Co-Authored-By: jfversluis <github@geraldversluis.nl>

* Update Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/WebView.cs

Co-Authored-By: jfversluis <github@geraldversluis.nl>

* Update Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/WebView.cs

Co-Authored-By: jfversluis <github@geraldversluis.nl>

* Update Xamarin.Forms.Core/PlatformConfiguration/AndroidSpecific/WebView.cs

Co-Authored-By: jfversluis <github@geraldversluis.nl>
2019-02-12 13:10:33 +00:00
Samantha Houts 9f80bbc266 Merge branch '3.5.0' 2019-01-18 15:02:10 -08:00
Matthew Leibowitz 9eac84a1fd Remove Unused Types (#4948)
* Remove NavigationMenu & Renderers
 - Never completed and there is the new CollectionView
 - Only (partially) implemented on iOS/Android

* Removing ToolbarButton and related types
 - `ToolbarButton`, `ToolbarImageButton`, `IToolbarButton`
 - this appears not to be used at all
 - was part of `ToolbarRenderer` in the old Duplo repo, which has since been removed

* Update Xamarin.Forms.Platform.cs
2019-01-16 08:37:02 +01:00
Pavel Yakovlev e3360aa8c9 [Shell] fixes navigate to a relative URI (#4977) 2019-01-15 15:05:51 +01:00
Andrei Nitescu 3043fb73b5 Map with ItemsSource and ItemTemplate (#4269) fixes #1708 2019-01-10 17:52:11 +00:00
Almir Vuk 5001460dd2 [Enhancement] Entry: Read-only Entry and Editor (#1972)
- fixes #1678
- fixes #4834

* InputView BindableProperty IsReadOnly

* Android Editor and Entry setup

* MacOS Editor and Entry setup

* Tizen Editor and Entry setup

* UAP Editor and Entry setup

* WPF Editor and Entry setup

* iOS Editor and Entry setup

* Issue1678 - TestContentPage added

* Tests added

* Tizen Editor and Entry fix

* UI Test fix

* Android fix for Entry and Editor.

* Unit Tests fix.

* Android Renderer first try.

* MacOS Entry renderer small fix.

* UpdateEditable fix.

* Android Entry and Editor reduced number of calls to BP.

* fix TestAttributes conflicts

* Remove keyboard

* [macOS] relinquish first responder

* [Android] remove call to UpdateCursorSelection

* [UWP] fix tabs
2019-01-10 09:21:28 -07:00
Stephane Delcroix 57d507ef0b Merge branch '3.5.0' 2019-01-07 11:32:11 +01:00
Stephane Delcroix c0dc00089a
[Flex] fix Padding on the FlexLayout (#4823)
As the flex engine doesn't handle x,y offset on the root layout,
handle that at the XF.FlexLayout level.

- fixes #2663
2018-12-21 09:23:41 +01:00
Stephane Delcroix c8cf3ba9ed
[C] WeakEventManager minor changes (#4774)
As pointed in https://github.com/xamarin/Xamarin.Forms/issues/4750#issuecomment-447673540,
internal WeakEventManager usage can be simplified.

This also updates the code to ValueTuple, throw expressions, ...
2018-12-19 14:23:44 +01:00
Rui Marinho 0a67f8b0a1 Merge branch '3.5.0' 2018-12-04 23:04:14 +00:00
Matthew Richardson 1e116658a1 [Enhancement] Add drag started and completed events/commands to Slider (#4423) fixes #1450
* Implement DragStarted and DragCompleted events/commands in Slider.

* Add Tizen support.

* Use explicit interface implementation.

* Fix unit tests.

* Update Xamarin.Forms.Core/ISliderController.cs

Co-Authored-By: velocitysystems <matthew@velocitysystems.co.nz>

* Fix whitespace.

* Add missing namespace import
2018-12-04 19:08:13 +00:00
Stephane Delcroix 8a758a2474 [XamlC] test for null in Binding paths (#4521) fixes #4102
* [XamlC] test for null in Binding paths

Instead of relying on a NRE behing thrown while trying to evaluate a
compiled binding getter, detect the null value and fail faster, without
throwing. This require changing the type of the getter so they return a
(TProperty, bool) value tuple indicating the success.

- fixes #4102

* depend on ValueTuple for ns1.0
2018-12-04 18:21:36 +00:00
Stephane Delcroix 47bd0cdeb8 [Shell] Allow queryParams navigation (#4615)
* [Shell] Allow queryParams navigation

Allow uri navigation with queryParams. queryParams can be applied
to:
- the ShellContent (if inherited)
- the Content (or inflated ContentTemplate) of the ShellContent
- the BindingContext of the Content

those 3 can inherit an interface and handle the queryParams, or
the types can be decorated with some [QueryProperty] attributes.
Attributes are handled on the 3 typesL ShellContent, actual content,
or bindingcontext.

- fixes #4596

* syntax errors

* Address formatting comments

* [Core] add check when setting BindingContext on page to self

* [Core] fix navigation for non templated item
2018-12-03 19:12:00 -08:00
Shane Neuville 8a61e2d870 [Core] remove code setting NavProxy to null (#4604) 2018-12-03 08:53:47 +01:00
Stephane Delcroix 78385f9fc1 [Shell] The glorious Shell (#4522)
* [Shell] The glorious Shell

* set the flag for the test

* remove the FastRenderer flag

* [Android] If we were disposed earlier Element can be null and Control was disposed

* [Controls] Seems part of #2520 was solved so we don't need this

* [iOS] Fix NRE on the ScrollviewTracker

* add missing constructor for RenderWith

* [Core] propagate visual/flow through shell

* use interlock increment

* hide IDataTemplateController

* [Android] Fix TableViewModelRenderer dispose

* [Core] propagate visual/flow direction through shell hierarchy

* [Android-Gallery] removed some left in settings changes that effect UI Tests

* [iOS,Droid,Core] Code formatting

* [iOS,Core] Last minute style refactoring
2018-11-29 20:22:51 -08:00
Víctor Guzmán 25d8663a1d Fix edge case in unsubscribing weak events (#4538)
When an event has two subscriptions to the same handler,
unsubscribing cleared all the handlers, not only one.
2018-11-29 12:58:42 +00:00
Shane Neuville 94e6621f72 [Enhancement] Add Visual progress behind feature flag (#4449) fixes #4435
* Visual

* add progress bar and fix ui tint color

* Progress Bar Updates

* ios padding fixes

* padding fix and button image positioning fixes

* added button themes

* disable tint and open up material android button

* change image to bank

* add overrides for Material Frame Renderer

* remove commented out code

* change back to Full linker

* applying comment fixes

* change comparison
2018-11-23 17:40:15 +00:00
Matthew Leibowitz 5959c40c94 Move last projects over to PackageReference (#4492)
* Move the first few projects over to PackageReference

* Move the first few projects over to PackageReference

* Moved the remainder of the projects to PackageReference

* Copy the nunit test adapters for the test apps

* Update the unit tests version of json.net

* Don't use relative paths

* Make sure to also copy sub folders

* Remove the trailing slash

* Keep the directory structure
2018-11-22 14:25:56 +00:00
Stephane Delcroix c74fd02df4 [tests] Change namespace of tests (#4502)
Change the namespace of some tests, allowing me to isolate the slow
running ones and avoid running them every single time.
2018-11-21 11:39:29 +00:00
Stephane Delcroix b2d7a4e1c1
[C] Allow recursive parts of binding path (#4028)
- fixes #3994
2018-11-21 08:33:15 +01:00
Stephane Delcroix 17f5ce556b
[C] support TargetNullValue in TypedBindings (#4490)
Call base.GetSourceValue so the TargetNullValue is returned in case of a
null value. I have no idea why the code was there, but commented out,
and I don't want any of you to start digging at the why it wasn't
enabled before.

- fixes #4103
2018-11-21 08:32:32 +01:00
E.Z. Hart aabe44fe7d [Enhancement] Add CollectionView progress behind feature flag (#4265)
* The barest beginnings of starting a spike for LV2

* Very basic RecyclerView

* Very, very basic UICollectionView

* Start setting up galleries

* De-duplicate some gallery code

* Android horizontal layout

* Very basic horizontal/vertical text lists for iOS

* Vertical list views working in iOS, stashing while trying to figure out what the deal is
with horizontal views and frames with heights of 1

* Working on rotation issues in iOS

* Fix name of renderer in UWP; make horizontal scrolling work for horizontal
lists on UWP

* Set up gallery to generate different sizes of lists for testing

* Respond to items source updates on UWP

* Add gallery for GridLayout; Add GridLayout;
begin GridLayout implementation UWP

* Basic UWP gridness

* Add demo page for grid layouts with text;
Handle grid layout spans on UWP; handle grid layout span changes on UWP;

* Implement span updates on Android grid layouts;

* Ironed out most of the iOS text cell layout issues

* iOS vertical/horizontal text lists now working reliably;

* In progress on UWP DataTemplate stuff

* Dumping the data template into the itemsource

* Vertical list basically working with DataTemplate; horizontal list having image size issues

* Clean up names and move classes to their own files

* Adding some notes for FormsContentControl

* Rolling back platform test on UWP

* Fix Tizen build

* Fix typo and roll back old test code

* Remove old testing comments

* Make basic data templates work on Android

* Update measure to work horizontally

* Remove old testing code

* Terser rectangles

* Use nameof()

* Rename FormsContentControl to ItemContentControl

* Use CreateRenderer instead of GetOrCreateRenderer

* Clean up TemplateCodeCollectionViewGallery

* Add grid galleries for templates

* Nicer example templates

* Create gallery to test removing items from collections

* Smooth single item removal on Android

* Smooth item insertion on Android

* Observable collection item adds working on UWP

* UWP Remove

* Split files

* Add gallery for snap points; start implementation of snap points on Android;

* Move snap handling to separate class; implement Start snapping (horizontally)

* Debugging vertical overlap issues on Android

* Temporarily add IsClippedToBounds to generators to force clipping on Android

* Start and End SnapHelpers are working horizontally and vertically

* Consolidate some snap code on Android

* Mandatory Single Snapping working for Center/Start horizontally

* Throwing together scrollto gallery

* Super basic "ScrollTo" implementation for Android, plus test page

* Expand ScrollTo test harness;

* Move ScrollToRequestEventArgs to its own file

* Mostly working Carousel renderer; needs some cleanup and its own gallery pages

* Carousel gallery

* Naming cleanup

* Make parameter name consistent

* Finally some basic data template functionality for lists

* Checkpoint; sort of working

* Working out estimate size hacks

* Working out cell optimizations

* Checkpoint before some serious refactoring

* Collapsing closer to a solution; text lists and grids working;
template lists and grids working; uniform size hint mostly implemented;

* Remove awkward Update method

* No longer hard-coding list item heights estimates

* Consolidate more code

* Get rid of event on ItemsViewLayout

* Remove public NeedsEstimate stuff

* Get rid of IConstrainedCell

* Watch for Span changes on iOS

* Indexed ScrollTo on iOS

* Implement removal/insertion of items on iOS

* Handle Move, Reset, Replace on Android

* Add screens to test ScrollTo Item; implement ScrollTo Item for iOS

* ScrollTo Item working on Android, but only works for MakeVisible

* Implement Android ScrollTo Animated ScrollToPosition

* Ugly but functional non-animated scroll with ScrollToPosition

* Move Scroll logic into helper class for clarity and maintenance

* Fix Start snapping with grids (hard-coded span of 1)

* Fix next/previous row/col snapping bug for EndSnapHelper

* Remove some debug statements

* Clean up example code

* Fix missing delegate setting on CollectionView

* Add filtering example

* Watching the adapter and handling empty view from the renderer

* Add debugging for all the FindViewHolder methods

* Suuuuper basic but functional EmptyView

* Allow EmptyView to be turned on and off

* Building tests for all the EmptyView scenarios

* Set Platform on EmptyView (for now)

* Templated EmptyView on Android

* Clean up merge errors

* Require flag to use CollectionView on Android

* Require flag to use CollectionView on UWP

* Restore Label functionality commented out during testing

* Adding a note for myself

* Add flags for iOS; flags for Android CarouselView;

* Remove Calabash out-commenting

* Undo changes to DotSettings; remove outdated TODOs

* Fix formatting

* Remove debugging code; remove outdated todos; remove unnecessary comments

* Undo randon VS changes

* Include CollectionView in experimental renderer testing

* Use correct property in nameof() call

* Rename ScrollToRequestEventArgs Animate -> IsAnimated

* Rename Constrain -> ConstrainTo for consistency

* Add Core flags feature; add flag verification for CollectionView features

* Make sure no one is subclassing native CollectionView stuff without flag

* Set CollectionView flags for unit tests

* Make flags depend on Application.Current

* Fix iOS 9.3 exception when laying out CollectionView

* Use Device.Flags

* Move CV flag check to CollectionView; use Device.Flags on native platforms;

* Move classes into their own files

* Make CollectionView flag check method non-browseable

* Remove old TODO

* Remove Element.Platform sets

* stubbed toolbox entries and snippets for Carousel and Collection

* updated CV snippet to include layout

* Remove Linq using statement

* Remove unused using statement

* Turn off CollectionView in Control Gallery

* Move PropertyChangedEventArgsExtensions to internal on each platform

* Clean up debugging code

* Fix broken test setup

* Remove ToString overrides

* Fix broken test screen
Fix broken test screen

* Fix rebase errors

* Update submodule

* Fix rebase error
2018-11-13 12:49:08 +00:00
E.Z. Hart 003cc44549 Add fake Platform property to Page to keep Previewer happy (#4355) fixes #4351
* Add fake Platform property to Page to keep Previewer happy: fixes #4351

* Make the fake Platform property internal

* Add unit tests to verify Previewer-required stuff in Core has not be changed

* Adding Obsolete to Page.Platform
2018-11-09 22:18:01 +00:00