Skip to content
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

Merged
merged 5 commits into from
Apr 8, 2022

Conversation

jfversluis
Copy link
Member

@jfversluis jfversluis commented Apr 1, 2022

Description of Change

Adds 3 copies of renderers for Entry, Editor and Label 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

  • Android

Behavioral/Visual Changes

Hopefully none, but this should maximize backwards and forwards compatibility on Android for Entry, Editor and Label.

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 call Forms.SetFlags("DisableAppCompatRenderers"); before the Forms.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

  • Targets the correct branch
  • Tests are passing (or failures are unrelated)

@jfversluis jfversluis added the DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. label Apr 1, 2022
@jfversluis jfversluis changed the title Update base for Android FormsTextView to AppCompatTextView Introduce Android AppCompat renderers for Entry, Editor and Label Apr 7, 2022
@jfversluis jfversluis removed the DO-NOT-MERGE-!!! 🛑 This is in progress and needs to be updated before it can be merged. label Apr 7, 2022
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.

[Bug] [Android] Google Emoji Policy Violation
2 participants