Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Image.Aspect #808

Closed
wants to merge 13 commits into from
Closed

Conversation

ionixjunior
Copy link
Contributor

Description of Change

Implements #400

Additions made

  • Moves Aspect enum to Maui core project
  • Creates IAspect interface with Aspect property
  • Creates IImage interface and implement IAspect and IView
  • Adds Aspect property map to ImageHandler
  • Adds Aspect mapping methods to ImageHandler for Android and iOS
  • Adds extension methods to apply Aspect on Android and iOS
  • Adds DeviceTests for initial Aspect values on Android and iOS

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

Doubts

Original reference of Aspect enum

The Aspect enum already existed inside the Controls.Core project, so I needed to move this implementation to the Core project. It is right?

Custom ImageView implementations

There are custom implementations of ImageView inside Android and iOS renderers. These classes are FormsImageView and FormsUIImageView. I didn't use them to specify in the ImageHandler, but I believe that should be important to do this. Should I use these custom ImageView implementations? Should I move these implementations to Core project?

ImageView Android implementation

The original implementation of Android custom renderer uses the ImageView class of Android.Widget. However, in the handler implementation, I used AppCompatImageView class of AndroidX.AppCompat.Widget. I believe that is the best way, but I was in doubt if I need to maintain the original implementation. Should I use the AppCompatImageView?

@ionixjunior
Copy link
Contributor Author

I believe that pull request #759 implements the aspect functionality and my pull request can be closed.

Someone can confirm this?

@mattleibow
Copy link
Member

Thanks for this PR @ionixjunior. Seems there might have been some mis-communication on this issue. Sorry about that.
Thanks for taking the time though.

@mattleibow mattleibow closed this May 24, 2021
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Jul 10, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2023
@Eilon Eilon removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor area-image Image loading, sources, caching labels May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants