Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Material Entry - change style from filled to regular #11063

Closed
Mikilll94 opened this issue Jun 15, 2020 · 3 comments
Closed

[Bug] Material Entry - change style from filled to regular #11063

Mikilll94 opened this issue Jun 15, 2020 · 3 comments
Labels

Comments

@Mikilll94
Copy link

Description

Right now Entry with Visual="Material" uses "Filled" material design style. Is there any possibility to change the style of any entry to "Regular"?

Screenshot 2020-06-15 at 20 31 22

The docs are saying that it is possible to customize Xamarin Material controls.
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/visual/material-visual

But right now it seems that it is impossible to change the style of an Entry even when using effects or custom renderers.

Steps to Reproduce

  1. Create an Entry with Visual="Material"
  2. As you can see, it has "filled" style. And it is not possible to change the style to "regular".

Expected Behavior

There should be a way to change the material style of entry.

Actual Behavior

There is no way to change the material style of entry, even when using effects or custom renderers.

Basic Information

  • Version with issue: 4.6.0.847
  • IDE: 8.6.3 (build 30)
  • Platform Target Frameworks:
    • Android: 9.0
@samhouts
Copy link
Member

This is not currently possible. This is planned with #5005.

@Mikilll94
Copy link
Author

@samhouts
Is this also impossible with custom renderers?

@PureWeen
Copy link
Contributor

@Mikilll94 Honestly I'm not sure off hand

I'll put it on the queue to try it out myself and fix whatever hooks I can on the renderer.

If you'd like to try my thinking would be

On Android:
Override this method
https://github.com/xamarin/Xamarin.Forms/blob/main/Xamarin.Forms.Material.Android/MaterialEntryRenderer.cs#L25

And create the type of layout you want
https://github.com/xamarin/Xamarin.Forms/blob/719fc7a604ff0cce8922d717c99bfb0fa17e35e0/Xamarin.Forms.Material.Android/Resources/Layout/TextInputLayoutFilledBox.axml

On iOS it's a bit trickier and I don't think there are great hooks there yet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants