This repository has been archived by the owner on May 1, 2024. It is now read-only.
Introduce Android AppCompat renderers for Entry, Editor and Label #15279
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Adds 3 copies of renderers for
Entry
,Editor
andLabel
which now inherit from the AppCompat version of the Android counterpart as opposed to the non-AppCompat version that it is currently.To ensure a safety switch these are copies of the existing renderers, the new renderers are the default, but with a flag you can revert back to the old renderers and behavior.
Issues Resolved
API Changes
Added:
public class EntryAppCompatRenderer : EntryRendererBase<FormsAppCompatEditText>
public class EditorAppCompatRenderer : EditorRendererBase<FormsAppCompatEditText>
public class LabelAppCompatRenderer : FormsAppCompatTextView
public class FormsAppCompatTextView : AppCompatTextView
public class FormsAppCompatEditText : FormsAppCompatEditTextBase
public class FormsAppCompatEditTextBase : AppCompatEditText
public class FormsAppCompatEditText : FormsAppCompatEditTextBase
public class FormsAppCompatEditTextBase : AppCompatEditText
Platforms Affected
Behavioral/Visual Changes
Hopefully none, but this should maximize backwards and forwards compatibility on Android for
Entry
,Editor
andLabel
.The new AppCompat renderers are the default as we expect no issues, but in case we do find issues, there is a flag to revert to the old behavior.
To do this, in your
MainActivity.cs
on Android callForms.SetFlags("DisableAppCompatRenderers");
before theForms.Init()
call.Before/After Screenshots
Not applicable
Testing Procedure
Add the resulting NuGet from this PR to your app and see if it behaves as before
PR Checklist