Skip to content

[Handlers] Add IndicatorView handler for iOS and Android - #2038

Merged
PureWeen merged 36 commits into
mainfrom
indicator-handler
Sep 22, 2021
Merged

PureWeen merged 36 commits into
mainfrom
indicator-handler

Conversation

@rmarinho

@rmarinho rmarinho commented Aug 11, 2021 •

Copy link
Copy Markdown
Member

Description of Change

Adding handler

Implements #

Additions made

public interface IIndicatorView : IView
{
	int Count { get; }
	int Position { get; }
	double IndicatorSize { get; }
	int MaximumVisible { get; }
	bool HideSingle { get; }
	Paint IndicatorsColor { get; }
	Paint PositionIndicatorColor { get; }
	IShape IndicatorShape { get; }
}

public interface ITemplatedIndicatorView : IIndicatorView
{
	ILayout? IndicatorsLayoutOverride { get; }
}
Android iOS
Screenshot_1628856399 2021-08-13_01-08-20-PM

PR Checklist

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)
  • Targets a single property for a single control (or intertwined few properties)
  • Adds the property to the appropriate interface
  • Avoids any changes not essential to the handler property
  • Adds the mapping to the PropertyMapper in the handler
  • Adds the mapping method to the Android, iOS, and Standard aspects of the handler
  • Implements the actual property updates (usually in extension methods in the Platform section of Core)
  • Tags ported renderer methods with [PortHandler]
  • Adds an example of the property to the sample project (MainPage)
  • Adds the property to the stub class
  • Implements basic property tests in DeviceTests

Does this PR touch anything that might affect accessibility?

  • Does this PR introduce a new control? (If yes, add an example using SemanticProperties to the SemanticsPage)
  • APIs that modify focusability?
  • APIs that modify any text property on a control?
  • Does this PR modify view nesting or view arrangement in anyway?
  • Is there the smallest possibility that your PR will change accessibility?
  • I'm not sure, please help me

If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.

public static readonly BindableProperty HideSingleProperty = BindableProperty.Create(nameof(HideSingle), typeof(bool), typeof(IndicatorView), true);

public static readonly BindableProperty IndicatorColorProperty = BindableProperty.Create(nameof(IndicatorColor), typeof(Color), typeof(IndicatorView), null);
public static readonly BindableProperty IndicatorColorProperty = BindableProperty.Create(nameof(IndicatorColor), typeof(Color), typeof(IndicatorView), Colors.LightGrey);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding default colors

@rmarinho
rmarinho marked this pull request as ready for review August 13, 2021 14:37
Text="Using with CarouselView"
Style="{StaticResource Headline}" VerticalOptions="Start" />
<StackLayout Grid.Row="7" Grid.Column="1" VerticalOptions="Start" >
<CarouselView IndicatorView="indicatorView" VerticalOptions="Start" HeightRequest="100" Loop="False">

@rmarinho rmarinho Aug 13, 2021 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CarouselVIew crashes if Loop =true on Android, and doesn't show when Loop=False

# Conflicts:
#	src/Controls/src/Core/Hosting/AppHostBuilderExtensions.cs
@jsuarezruiz

Copy link
Copy Markdown
Contributor

@rmarinho Is ready to review?, could you rebase to fix the conflicts?. Thnx!

@rmarinho

Copy link
Copy Markdown
Member Author

@jsuarezruiz yes ready for review

@jsuarezruiz jsuarezruiz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we include some Device test?. By adding a basic one where an IndicatorView is created with some elements and validating the colors (from each element and from the selected one), it is a great test that allows us to detect if at any time there is a problem setting the size, instantiating or rendering the control as well as assign colors.

rookiejava added a commit to rookiejava/maui that referenced this pull request Feb 25, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Feb 28, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 2, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 2, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 3, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 4, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 7, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 8, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 8, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 9, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 10, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 10, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 10, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 10, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 11, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 14, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 14, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 15, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 16, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 18, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 21, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 22, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 22, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 22, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 23, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 24, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 25, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 28, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 28, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
rookiejava added a commit to rookiejava/maui that referenced this pull request Mar 31, 2022
- ImageButtonHandler and Handler Re-usability (dotnet#2352)
- Remove IBoxView (dotnet#2619)
- Add SupportedOSPlatformVersion (dotnet#2565)
- Merge all the .NET 6 projects/solutions (dotnet#2505)
- Shadow Support (dotnet#570)
- Add IndicatorView handler(dotnet#2038)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

fixed-in-6.0.101-preview.10 Look for this fix in 6.0.101-preview.10! legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor platform/android platform/ios platform/windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants